10.06.2013, 14:42
try this one
pawn Код:
DelVehicle(vehicleid)
{
for(new players=0;players<=MAX_PLAYERS;players++)
{
new Float:X,Float:Y,Float:Z;
if (IsPlayerInVehicle(players,vehicleid))
{
GetPlayerPos(players,X,Y,Z);
SetPlayerPos(players,X,Y,Z+2);
SetVehicleToRespawn(vehicleid);
}
SetVehicleParamsForPlayer(vehicleid,players,0,1);
}
SetTimerEx("VehRes",3000,0,"d",vehicleid);
return 1;
}
pawn Код:
dcmd_destroyv(playerid,params[])
{
#pragma unused params
if(IsPlayerInAnyVehicle(playerid))
{
DelVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid,-1,"You've successfully Destroyed This car");
}
else
{
SendClientMessage(playerid,red,"Error: You must sit in the Car before using this command!");
}
return 1;
}