Cassandra Posted March 1, 2013 Share 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) Link to comment
Cassandra Posted March 1, 2013 Author Share Posted March 1, 2013 any debug error? Nope. Weird huh? Link to comment
Fury Posted March 1, 2013 Share Posted March 1, 2013 any debug error? Nope. Weird huh? are you sure that "botGet" function is working properly? Link to comment
Cassandra Posted March 1, 2013 Author Share Posted March 1, 2013 any debug error? Nope. Weird huh? are you sure that "botGet" function is working properly? Yeah it works. Link to comment
Castillo Posted March 1, 2013 Share Posted March 1, 2013 Your bot is created client side? if so, that's the reason. Link to comment
Fury Posted March 1, 2013 Share Posted March 1, 2013 Yeah it works. i think u should create and check peds at server-side. that might be the problem. Link to comment
Cassandra Posted March 1, 2013 Author Share 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? Link to comment
Castillo Posted March 1, 2013 Share Posted March 1, 2013 Yes, if a element is created client side, the server doesn't know about it. Link to comment
Fury Posted March 1, 2013 Share Posted March 1, 2013 Yes, if a element is created client side, the server doesn't know about it. setElementID() getElementByID() hm? Link to comment
Cassandra Posted March 1, 2013 Author Share 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. Link to comment
Castillo Posted March 1, 2013 Share Posted March 1, 2013 No, that's different, e.g: you can send a ped element and do stuff with him. Link to comment
Cassandra Posted March 1, 2013 Author Share 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. 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