19.04.2012, 03:54
How to delete the last spawned vehicle from /v?
if there is no more last spawned vehicle the /deletev will stop
How to do it?
EDIT:
i have also problem with /v why when ever i type valid vehicle id it gives me
" Invalid VehicleID "
if there is no more last spawned vehicle the /deletev will stop
How to do it?
pawn Код:
CMD:v(playerid, params[])
{
new vid = GetPlayerVehicleID(playerid);
new veh = GetVehicleModel(vid);
new string[128], Float:x, Float:y, Float:z, Float:ang, vehicle;
if(pInfo[playerid][Admin] < 1) return SendClientMessage(playerid, COLOR_GREY, " You are not organize to use this command! ");
if(sscanf(params, "i", veh)) return SendClientMessage(playerid, COLOR_GREY, "SYNTAX: /v [vehicleid]");
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, ang);
if(veh > 400 || veh < 611) return SendClientMessage(playerid, COLOR_GREY, " Invalid VehicleID ");
vehicle = CreateVehicle(veh, x, y, z, 0, -1, -1, 0);
PutPlayerInVehicle(playerid, vehicle, 0);
format(string, sizeof(string), "You've spawned vehicle id '%i'", veh);
SendClientMessage(playerid, COLOR_YELLOW, string);
return 1;
}
i have also problem with /v why when ever i type valid vehicle id it gives me
" Invalid VehicleID "