Jump to content

Cassandra

Members
  • Posts

    200
  • Joined

  • Last visited

Everything posted by Cassandra

  1. It doesn't make the bot jump when clearpath, jumping and isTimer is equals to false. It occurs frequently but randomly. Inside onClientRender local jumping = getPedControlState(bot, "jump") local clearpath = isLineOfSightClear(px, py, pz+2, x, y, z+2, true, true, false, true, false, true, false) outputChatBox("Clear: " .. tostring(clearpath)) outputChatBox("Jumping: " .. tostring(jumping)) if((clearpath == false) and (jumping == false) and (isTimer(jumpTimer) == false)) then setPedAnimation(bot) setPedControlState(bot, "jump", true) jumpTimer = setTimer(setPedControlState, 500, 1, bot, "jump", false) end
  2. Aaah thanks for clarifying. I got it now.
  3. Is that the same the other way around? Like if the element is created server side, the client doesn't know about it.
  4. Aaaaah thought about that. Is that the same for all other elements?
  5. Nope. Weird huh? are you sure that "botGet" function is working properly? Yeah it works.
  6. 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)
  7. Aaaah gotcha. Thanks for clarifying it.
  8. Why do people put spawnPlayer, fadeCamera, etc inside a timer which has no interval? What's the point of it?
  9. setAccountData doesn't take in decimal values. It coverts them to whole number.
  10. Alright seem like I have to use that anyway. I have a problem though. Does anyone know why setAccountData doesn't set floating values? My player's position is a bit messed up for that.
  11. I want to use bandwidth but I don't want to use setElementData or another trigger function. Will it be possible to reference that variable?
  12. Suggestion: Could you make the server folder directory configurable?
  13. Is there a way to get the return value of a function using triggerServer/ClientEvent?
  14. Not a good way of advertising I would say.
  15. Aren't there are any alternatives for that? To make a pickup not pickable.
  16. Yeah. I guess I have to stick with the "exports".
  17. Ooops sorry for not explaining better. I'm needing a method to use a function from other files on the same resource. So, for example I want to use that function above to my other scripts on the same resource. I don't want it to declare over and over again for each scripts.
  18. Is there a way to reuse a function on different files?(Doesn't matter if it's server/client) For example if I have this code in s_player.lua function multi_check( source, ... ) local arguments = { ... }; for _, argument in ipairs( arguments ) do if argument == source then return true; end end return false; end I want to use that function on all of the different files.
  19. Thanks. That what I was looking for.
  20. Similar. I want it to play gta world sound instead.
×
×
  • Create New...