Destroycars - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Destroycars (
/showthread.php?tid=486768)
Destroycars -
MahdiGames - 10.01.2014
How to destroycars With Type "CreateVehicleEx" When the player exit from vehicle "Iv many cars spawned in server",
I tried this code
Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
SetTimerEx("delcar", 15000, 0, "i", vehicleid);
return 1;
}
forward delcar(vehicleid);
public delcar(vehicleid)
{
SetVehicleToRespawn(vehicleid);
return 1;
}
but its destroy the car even if u r in vehicle or press CTRL while you are in vehicle!
Re: Destroycars -
newbie scripter - 10.01.2014
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_DRIVER)
{
SetTimerEx("delcar", 15000, 0, "i", vehicleid);
}
return 1;
}
Re: Destroycars -
MahdiGames - 10.01.2014
Quote:
Originally Posted by newbie scripter
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate) { if(oldstate == PLAYER_STATE_DRIVER) { SetTimerEx("delcar", 15000, 0, "i", vehicleid); } return 1; }
|
Thanks can i do like that:-
Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_DRIVER)
{
SetTimerEx("delcar", 15000, 0, "i", vehicleid);
}
return 1;
}
forward delcar(vehicleid);
public delcar(vehicleid)
{
DestroyVehicle(vehicleid);
return 1;
}
Re: Destroycars -
amirab - 10.01.2014
yes you can
Re: Destroycars -
MahdiGames - 10.01.2014
When i exit from vehicle and enter another vehicle the old one not destroyed and the new one destroy! Error.