SA-MP Forums Archive
Command Problem - 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: Command Problem (/showthread.php?tid=395761)



Command Problem - Blackazur - 27.11.2012

Код:
COMMAND:car(playerid, params[])
{
    if(PlayerAdmin[playerid] < 4) return SendClientMessage(playerid,COLOR_RED,"You cannot use this Command!");
    {
        new Float:Position[3];
        GetPlayerPos(playerid, Float:Position[0], Float:Position[1], Float:Position[2]);
        CreateVehicle(411, Float:Position[0]+3, Float:Position[1]+3, Float:Position[2], 0, 0, 0, 9999);
        return 1;
    }
}
How to make a Command that remove the Car?


Re: Command Problem - Djole1337 - 27.11.2012

https://sampwiki.blast.hk/wiki/DestroyVehicle


AW: Command Problem - Blackazur - 27.11.2012

But how can i make that with DestroyVehicle with ZCMD and sscanf?


Re: Command Problem - Djole1337 - 27.11.2012

pawn Код:
CMD:dcar(playerid, params[])
{
    new veh;
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "You must be in a vehicle to use this command.");
    veh = GetPlayerVehicleID(playerid);
    DestroyVehicle(veh);
    return 1;
}
Very simple one.