SA-MP Forums Archive
destroycar cmd? - 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: destroycar cmd? (/showthread.php?tid=347471)



destroycar cmd? - sanrock - 02.06.2012

How do I make a destroy car cmd but that only destroys cars that were spawned by hackers / admins

not server sided cars.


Re: destroycar cmd? - Flake. - 02.06.2012

you mean somthing like this?
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_ONFOOT && oldstate == PLAYER_STATE_DRIVER)
    {
    new vid = GetPlayerVehicleID(playerid);
    SetTimerEx("destroy", 15000, false, "d", vid);
    }
    return 1;
}

forward destroy(vid);
public destroy(vid)
{
    DestroyVehicle(vid);
    return 1;
}