A_TERMINATOR Posted April 3, 2012 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.
sckatchof Posted April 3, 2012 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)
sckatchof Posted April 3, 2012 Posted April 3, 2012 Is player spawned, when you give him weapon? i think he make a gui when players spawned
A_TERMINATOR Posted April 3, 2012 Author Posted April 3, 2012 Ouh... Thank you Minokon, u r the best! I have triggerServerEvent before callServerFunction("spawnPlayer ...
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