13.07.2011, 07:55
is possible make filterscript when u write /delcars all cars have been deleted ? or spawn cars wanis for some time when they havent driver ?
#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;
}
OnPlayerStateChange
{
if(PLAYER_STATE_DRIVER) return 1;
if(!PLAYER_STATE_DRIVER)
{
new Veh;
Veh=GetPlayerVehicleID(playerid);
DestroyVehicle(Veh);
return 1;
}
return 1;
}
public OnPlayerStateChange(playerid,newstate,oldstate)