Jump to content

Cassandra

Members
  • Posts

    200
  • Joined

  • Last visited

Everything posted by Cassandra

  1. I see. Will something like this work? function infectantsSpawnerStart(player) SpawnTime = math.random(5000, 10000) SpawnTimer = setTimer(infectantSpawnTimer, SpawnTime, 0, player) end function infectantSpawnTimer(player) killTimer(SpawnTimer) outputChatBox("An infectant should spawn now", player) if(isElement(player)) then infectantsSpawn(player) SpawnTime = math.random(5000, 10000) SpawnTimer = setTimer(infectantSpawnTimer, SpawnTime, 0, player) end end
  2. Sorry for bothering but I've another question. How to change a timer's interval?
  3. I tried finding it on the getPedMoveState but it's not there. Can someone point me in the right direction to do so?
  4. I did checked the distance. I only need to check the rotation if the ped facing the other ped.
  5. Yeah, I thought about that. But, there's no function to complete the logic behind it.
  6. I got the seeing part but not the rotation part. For example if the ped crouch sideways but still behind another ped, the ped sees it. Edit: IsElementOnScreen doesn't work for peds only players.
  7. How can I make use of isElementInPhotograph to check if the ped is facing and can see the other ped?
  8. You can but the rotation has to be accurate in that case it's very unlikely the ped will see the other ped script-wise.
  9. How can you tell if a ped is facing another ped and that ped can see the other ped?
  10. Don't use normal variables for player variables, use element data with the example I showed you. Another example: setElementData(player, "tempokit2", true) local istrue = getElementData(player, "tempokit2")
  11. Fixed. It was a problem with the check.
  12. Could be. How can I set a delay inside a timer?
  13. Using setElementData and getElementData to get the variable value later on. This is an example. setElementData(playerpointer, "variablename", true/false) local toggle = getElementData(playerpointer, "variablename")
  14. Too much variable declaration on a block I would guess. Without the code it would be hard to assume.
  15. That will be the same as you have to check the other team members.
  16. Hello Guys/Gals, Is there a way to make this function dynamic? By dynamic, I mean that it will automatically get the lowest members a team has and return it without providing the names and members of all the teams. local Clans = { { "Sanity", { 0, 0, 255 }, {150, 250, 14} }, { "Blodz", { 255, 0, 0 }, {50, 300, 15} }, { "Gringo", { 0, 255, 0 }, {350, 10, 16} } } function clanForMember() local clancount = {} clancount[1] = clanCountMembers("Sanity") clancount[2] = clanCountMembers("Blodz") clancount[3] = clanCountMembers("Gringo") if(clancount[1] < clancount[2] and clancount[3]) then return clanGet("Sanity") elseif(clancount[2] < clancount[1] and clancount[3]) then return clanGet("Blodz") elseif(clancount[3] < clancount[1] and clancount[2]) then return clanGet("Gringo") else local clanrnd = math.random(1, 3) return clanGet(Clans[clanrnd][1]) end end
  17. I think he mean't the sound when a bullet shell hits the ground.
  18. Can you be more specific because I've fixed some syntax highlighting issues in the next release (NOT 0.3.4804). Thanks. Aaaah that might be the problem.
  19. I don't think you are really serious at all. Post some more info on what you want from the scripter or what is needed to be done.
  20. There was a suggestion for onServerTick which get's called every frame but sadly it hasn't been implemented yet.
×
×
  • Create New...