Jump to content

iMr.3a[Z]eF

Members
  • Posts

    862
  • Joined

  • Last visited

Everything posted by iMr.3a[Z]eF

  1. The timer is make no senses while you are putting it out of the command handler Is it the same errors?
  2. my bad: try this function setHealth (theplayer) local Ganim = getPedAnimation (theplayer) local health = getElementHealth(theplayer) local daAnim = getElementData(root, "animz") local daBlockz = getElementData(root, "blockz") if daBlockz == "Laying" and daAnimz == "Lay_Bac_Loop" then setPedAnimation(theplayer,false) else setPedAnimation (theplayer, "LAYING", "Lay_Bac_Loop") end if Ganim then setElementHealth ( player, health +5) end end setTimer(setHealth, 4000, 1) addCommandHandler ("relax", setHealth)
  3. try this now function setHealth (theplayer) local Ganim = getPedAnimation (theplayer, "Lay_Bac_Loop") local health = getElementHealth(theplayer) local daAnim = getElementData(root, "animz") local daBlockz = getElementData(root, "blockz") if daBlockz == "Laying" and daAnimz == "Lay_Bac_Loop" then setPedAnimation(theplayer,false) else setPedAnimation (theplayer, "LAYING", "Lay_Bac_Loop") end if Ganim then setElementHealth ( player, health +5) end end setTimer(setHealth, 4000, 1) addCommandHandler ("relax", setHealth)
  4. So, they aren't different events.
  5. The script is long, did you check for debugacript 3?
  6. function getAlivePlayersInTeam(theTeam) local theTable = { } local players = getPlayersInTeam(theTeam) for i,v in pairs(players) do if not isPedDead(v) then theTable[#theTable+1]=v end end return theTable end
  7. because the object name is very different in these functions -- creating world for i, object in ipairs(room.objects)do local obj = createObject(object.model, object.x, object.y, object.z, object.rx, object.ry, object.rz) engineSetModelLODDistance (object.model, 170) setElementDimension(obj, room.id) table.insert(Objects, obj) end
  8. Hmm still not working -- creating world for i, object in ipairs(room.objects)do local obj = createObject(object.model, object.x, object.y, object.z, object.rx, object.ry, object.rz) engineSetModelLODDistance (object.model, 170) setElementDimension(obj, room.id) table.insert(Objects, obj) end What's the object name? i mean like this local theObjectName createObject(...)
  9. Explain me "object visible from far".
  10. there is an argument for the window parent, attach it with window or use GUIEditor easily x = guiCreateButton( 0.7, 0.1, 0.2, 0.1, "Output!", true, myWindpw )
  11. write the function at line 123 and 124
  12. at write the codes at 123 and 124
  13. at 116 be sure that the label name is correct
  14. it won't works try this function WeaponLevels (killer, weapon) local Nothing = tonumber(getPedStat(killer, 69)) if Nothing <= 100 and weapon == 22 then guiSetText (GUIEditor.label[3], "Level: 1") elseif Nothing <= 200 and Nothing > 100 and weapon == 22 then guiSetText (GUIEditor.label[3], "Level: 2") elseif Nothing <= 300 and Nothing > 200 and weapon == 22 then guiSetText (GUIEditor.label[3], "Level: 3") elseif Nothing <= 400 and Nothing > 300 and weapon == 22 then guiSetText (GUIEditor.label[3], "Level: 4") elseif Nothing <= 500 and Nothing > 400 and weapon == 22 then guiSetText (GUIEditor.label[3], "Level: 5") elseif Nothing <= 600 and Nothing > 500 and weapon == 22 then guiSetText (GUIEditor.label[3], "Level: 6") elseif Nothing <= 700 and Nothing > 600 and weapon == 22 then guiSetText (GUIEditor.label[3], "Level: 7") elseif Nothing <= 800 and Nothing > 700 and weapon == 22 then guiSetText (GUIEditor.label[3], "Level: 8") elseif Nothing <= 900 and Nothing > 800 and weapon == 22 then guiSetText (GUIEditor.label[3], "Level: 9") elseif Nothing <= 1000 and Nothing > 900 and weapon == 22 then guiSetText (GUIEditor.label[3], "Level: 10") end end addEventHandler( "onClientRender",getRootElement(), WeaponLevels)
  15. In guiSetText, remove ",Nothing"
  16. is there any errors at debugscript 3?
  17. try this: function WeaponLevels (killer, weapon) local Nothing = tonumber(getPedStat(killer, 69)) if Nothing = 100 and weapon = 22 then guiSetText (GUIEditor.label[3], "Level: 1",Nothing) elseif Nothing == 200 and weapon == 22 then guiSetText (GUIEditor.label[3], "Level: 2",Nothing) elseif Nothing == 300 and weapon == 22 then guiSetText (GUIEditor.label[3], "Level: 3",Nothing) elseif Nothing == 400 and weapon == 22 then guiSetText (GUIEditor.label[3], "Level: 4",Nothing) elseif Nothing == 500 and weapon == 22 then guiSetText (GUIEditor.label[3], "Level: 5",Nothing) elseif Nothing == 600 and weapon == 22 then guiSetText (GUIEditor.label[3], "Level: 6",Nothing) elseif Nothing == 700 and weapon == 22 then guiSetText (GUIEditor.label[3], "Level: 7",Nothing) elseif Nothing == 800 and weapon == 22 then guiSetText (GUIEditor.label[3], "Level: 8",Nothing) elseif Nothing == 900 and weapon == 22 then guiSetText (GUIEditor.label[3], "Level: 9",Nothing) elseif Nothing == 1000 and weapon == 22 then guiSetText (GUIEditor.label[3], "Level: 10",Nothing) end end addEventHandler( "onClientRender",getRootElement(), WeaponLevels)
  18. function cdoshoot(theVehicle) local theVehicle = getPedOccupiedVehicle(localPlayer) if bindTrigger == 1 then if not isPlayerDead(localPlayer) then bindTrigger = 0 local x,y,z = getElementPosition(theVehicle) local rX,rY,rZ = getElementRotation(theVehicle) local x = x+4*math.cos(math.rad(rZ+90)) local y = y+4*math.sin(math.rad(rZ+90)) createProjectile(theVehicle, 19, x, y, z, 1.0, nil) setTimer(allowShoots, 4000, 1) allowShoots() bindKey("fire", "down", cdoshoot) end end end function allowShoots() bindTrigger = 1 end
  19. use killPed not setElementHealth.
  20. it's not defined in the function cdoshoot
  21. theVehicle & cLP Aren't defined
×
×
  • Create New...