01.07.2009, 20:27
I desperatly need a timer to destroy objects and/or vehicles
Today i tried it, i wanted to destroy a vehicle on a timer.
destroyvehicle didnt worked..so i tried it with createexplosion..well that worked but i
still cant figure out why destroyobject didnt work.
Maybe someone can explain ?
i got this now;
This code worked with the explosions though and i did the define andpublic thing ofcourse
Today i tried it, i wanted to destroy a vehicle on a timer.
destroyvehicle didnt worked..so i tried it with createexplosion..well that worked but i
still cant figure out why destroyobject didnt work.
Maybe someone can explain ?
i got this now;
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
{
new vehiclemod = GetVehicleModel (GetPlayerVehicleID(playerid));
if(vehiclemod == 432 )
SetTimerEx("explosion", 20000, false, "20");
DestroyVehicle(432);
}
return 1;
}


sleepy time now thnx (again)
