A_TERMINATOR Posted April 3, 2012 Share Posted April 3, 2012 Hi, I have big problem with this code: client-side: triggerServerEvent("giveWeaponOnSpawn", getLocalPlayer()) server-side: function giveWeaponOnSpawn() outputChatBox("You have minigun!", source) if (giveWeapon(source, 38, 999, true) == true) then outputChatBox("succesfully", source) else outputChatBox("not succesfully", source) end end addEvent("giveWeaponOnSpawn", true) addEventHandler("giveWeaponOnSpawn", getRootElement(), giveWeaponOnSpawn) And on chat I have: "You have minigun!" "succesfully" but I don't have a minigun Help, please. Link to comment
sckatchof Posted April 3, 2012 Share Posted April 3, 2012 try this Server Side : function giveWeaponOnSpawn() giveWeapon( source, 38, 999, true ) outputChatBox( "You have minigun!", source ) outputChatBox("succesfully") else outputChatBox("not succesfully") end addEvent("giveWeaponOnSpawn", true) addEventHandler("giveWeaponOnSpawn", getRootElement(), giveWeaponOnSpawn) Link to comment
Minokon Posted April 3, 2012 Share Posted April 3, 2012 Is player spawned, when you give him weapon? Link to comment
sckatchof Posted April 3, 2012 Share Posted April 3, 2012 Is player spawned, when you give him weapon? i think he make a gui when players spawned Link to comment
A_TERMINATOR Posted April 3, 2012 Author Share Posted April 3, 2012 Ouh... Thank you Minokon, u r the best! I have triggerServerEvent before callServerFunction("spawnPlayer ... Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now