delcars - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: delcars (
/showthread.php?tid=268618)
delcars -
SydonaiCZ - 13.07.2011
is possible make filterscript when u write /delcars all cars have been deleted ? or spawn cars wanis for some time when they havent driver ?
Re: delcars -
[MG]Dimi - 13.07.2011
It's possible. FOr delete cars use loop to scroll through all cars.
PHP код:
#include <a_samp>
public OnPlayerCommandText(playerid,cmdtext[])
{
if(strcmp("/delcars",cmdtext,true) == 0)
{
if(IsPlayerAdmin(playerid))
{
SendClientMessage(playerid,0xFF0000FF,"You have deleted all cars on server!");
for(new i;i<MAX_VEHICLES;i++)
DestroyVehicle(i);
return 1;
}
return 1;
}
return 0;
}
This should work
Re: delcars -
SydonaiCZ - 13.07.2011
is possible make respawn of static cars ? i can give u xyz of them
Re: delcars -
[ISS]Daniele_Tom - 13.07.2011
PHP код:
OnPlayerStateChange
{
if(PLAYER_STATE_DRIVER) return 1;
if(!PLAYER_STATE_DRIVER)
{
new Veh;
Veh=GetPlayerVehicleID(playerid);
DestroyVehicle(Veh);
return 1;
}
return 1;
}
When a player exiting from its vehicle delete his car!
is not what u have requested, but I can do only this ...
Re: delcars -
SydonaiCZ - 13.07.2011
it is good but i dont know how write it to pawno
ita say me lots of errors
Re: delcars -
[MG]Dimi - 13.07.2011
Add [ISS]Daniele_Tom's script under
pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)