Page 1 of 1

Give Player Command

Posted: Mon Oct 10, 2016 3:19 pm
by velocity
How do I spawn a weapon and give it to the player?

Syntax: Select all

@Event("player_spawn")
def OnSpawn(game_event):
userid = game_event['userid']
player = Player.from_userd(userid)
--> player.give("weapon_ak47")

Re: Give Player Command

Posted: Mon Oct 10, 2016 3:34 pm
by satoon101

Syntax: Select all

player.give_named_item('weapon_ak47')


* Edit: You can always use dir(<object>) to find all available attributes/methods/properties of any Entity/Player/Weapon object.