I told you why the while loops are probably crashing - you need to be using them only to iterate through something, for example:Deviss wrote:i know and i tested by make crash :S , maybe because WHILE? but supposly while must work without problems in lua, but always i use it cause crash :S , for this reason i need if zerted can save me, or yes or yes i need use IF for no crash xD
Code: Select all
variable = 0
while variable < 10 do
print(variable)
variable + 1
endCode: Select all
checkvehtime = CreateTimer("checkveh")
SetTimerValue(checkvehtime, 1)
StartTimer(checkvehtime)
checkvehicle = OnTimerElapse(
function(timer)
if IsCharacterHuman(GetTeamMember(1,0) or IsCharacterHuman(GetTeamMember(2,0) then
if GetCharacterVehicle(GetTeamMember(1,0)) or GetCharacterVehicle(GetTeamMember(2,0)) then
SetProperty("vehiclespawnname", "AddHealth", 0)
end
end
SetTimerValue(checkvehtime, 1)
StartTimer(checkvehtime)
end,
checkvehtime
)


