02.08.2013, 17:50
Код:
if(strcmp(cmd, "/deletevehicle", true) == 0 || strcmp(cmd, "/dv", true) == 0) { new veh = GetPlayerVehicleID(playerid); if(IsPlayerConnected(playerid)) { if(IsPlayerInAnyVehicle(playerid)) { if(veh == PlayerVehicleID1[playerid]) { ResetPlayerVehicle(playerid, 1); OnPlayerSave(playerid); format(string, sizeof(string), "Your vehicle have been deleted."); SendClientMessage(playerid, COLOR_YELLOW, string); } else if(veh == PlayerVehicleID2[playerid]) { ResetPlayerVehicle(playerid, 2); OnPlayerSave(playerid); format(string, sizeof(string), "Your vehicle have been deleted."); SendClientMessage(playerid, COLOR_YELLOW, string); } else { SendClientMessage(playerid,COLOR_GREY," You are not in a vehicle that you own."); } } else { SendClientMessage(playerid,COLOR_GREY," You are not driving a vehicle."); } } return 1; }