Cassandra Posted March 1, 2013 Posted March 1, 2013 What might be the problem? client: addCommandHandler("givewep", function(command, botid, weapon) botid = botid or 1 weapon = weapon or "Knife" bot = botGet(botid) or outputChatBox("Invalid Bot.") local weaponid = getWeaponIDFromName(weapon) or outputChatBox("Invalid Weapon.") if(bot and weapon) then triggerServerEvent("eGiveBotWeapon", localPlayer, bot, weaponid) outputChatBox("Bot " .. tostring(id) .. " given weapon " .. weapon) end end) server: function giveBotWeapon(bot, weaponID) setTimer(giveWeapon, 300, 1, bot, weaponID, 1, true) end addEvent("eGiveBotWeapon", true) addEventHandler("eGiveBotWeapon", root, giveBotWeapon) Regards, Cassandra - V:MP
Cassandra Posted March 1, 2013 Author Posted March 1, 2013 any debug error? Nope. Weird huh? Regards, Cassandra - V:MP
Fury Posted March 1, 2013 Posted March 1, 2013 any debug error? Nope. Weird huh? are you sure that "botGet" function is working properly? Destruction Derby
Cassandra Posted March 1, 2013 Author Posted March 1, 2013 any debug error? Nope. Weird huh? are you sure that "botGet" function is working properly? Yeah it works. Regards, Cassandra - V:MP
Castillo Posted March 1, 2013 Posted March 1, 2013 Your bot is created client side? if so, that's the reason. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Fury Posted March 1, 2013 Posted March 1, 2013 Yeah it works. i think u should create and check peds at server-side. that might be the problem. Destruction Derby
Cassandra Posted March 1, 2013 Author Posted March 1, 2013 Your bot is created client side? if so, that's the reason. Aaaaah thought about that. Is that the same for all other elements? Regards, Cassandra - V:MP
Castillo Posted March 1, 2013 Posted March 1, 2013 Yes, if a element is created client side, the server doesn't know about it. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Fury Posted March 1, 2013 Posted March 1, 2013 Yes, if a element is created client side, the server doesn't know about it. setElementID() getElementByID() hm? Destruction Derby
Cassandra Posted March 1, 2013 Author Posted March 1, 2013 Yes, if a element is created client side, the server doesn't know about it. Is that the same the other way around? Like if the element is created server side, the client doesn't know about it. Regards, Cassandra - V:MP
Castillo Posted March 1, 2013 Posted March 1, 2013 No, that's different, e.g: you can send a ped element and do stuff with him. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Cassandra Posted March 1, 2013 Author Posted March 1, 2013 No, that's different, e.g: you can send a ped element and do stuff with him. Aaah thanks for clarifying. I got it now. Regards, Cassandra - V:MP
Castillo Posted March 1, 2013 Posted March 1, 2013 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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