Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.

New to the forum? Say hello in this topic! Also make sure to read the rules.

Giving items

Here you can find answered ScriptAPI topics.
Forum rules
By using the forum you agree to the following rules.
Post Reply
User avatar
FRU1TSALAD
Meatbag
Posts: 3
Joined: Wed Apr 18, 2018 10:53 pm
Title: The Great Bamboozler
SFD Account: Lol9er9er
SFD Alias: FRU17 $ALAD
Started SFD: October 2016
Location: Severn,MD
Age: 16
Contact:

Giving items

Post by FRU1TSALAD » Sat Apr 28, 2018 3:47 am

Is there a command that allows items such as pistols to be given to players? I am making a map that requires this
0 x
"You can catch flies with honey, but you'll catch more honeys bein' fly"

User avatar
Gurt
Lead Programmer
Lead Programmer
Posts: 1241
Joined: Sun Feb 28, 2016 3:22 pm
Title: Lead programmer
Started SFD: Made it!
Location: Sweden
Gender:
Age: 28

Post by Gurt » Sat Apr 28, 2018 11:36 am

Use the IPlayer.GiveWeaponItem(WeaponItem weaponItemToGive ) function. See the ScriptAPI for more details.

IPlayer plr = ...;
plr.GiveWeaponItem(WeaponItem.PISTOL);
0 x
Gurt

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest