Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 18/07/23 in all areas

  1. Thank you for helping
    1 point
  2. try it and see the result
    1 point
  3. You should check your models/scripts.
    1 point
  4. Thank you for answer, i have 24gb memory ram and have this problem, What do you think we should do to solve this problem? Because it is really annoying
    1 point
  5. so, you are saving a "string" value in that key. You should do a data type check. you could remaster the code, as it has some inconsistencies. Remember that the code is executed line by line, doing what we indicate, therefore, we must be logical and specific when programming. function deanimated( ammo, attacker, weapon, bodypart ) if (attacker) then if (getElementType ( attacker ) == "player") and (getElementType ( source ) == "ped") then if (getElementData (source, "zombie") == true) then local oldZcount = getElementData(attacker, "Zombie kills") or 0 -- get the value, if it has no value, by default, assign value 0 to the variable oldZcount if (type(oldZcount) ~= "number") then -- added to check the data type that is 'oldZcount', if different from number, (expected value) assign value 0 to the variable oldZcount oldZcount = 0 end setElementData(attacker, "Zombie kills", oldZcount + 1) triggerEvent("onZombieWasted", source, attacker, weapon, bodypart) end end end end it is not tested
    1 point
×
×
  • Create New...