CMD:deleteveh(playerid,params[]) { if(!IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid, -1, "You need to be in a vehicle to use this command"); { new vehicleid = GetPlayerVehicleID(playerid); DestroyVehicle(vehicleid); SendClientMessage(playerid, COLOUR_RED,"You have removed this vehicle"); } return 0; }
(1623) : warning 225: unreachable code Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning.
CMD:deleteveh(playerid,params[]) { if(!IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid, -1, "You need to be in a vehicle to use this command"); return 0; { new vehicleid = GetPlayerVehicleID(playerid); DestroyVehicle(vehicleid); SendClientMessage(playerid, COLOUR_RED,"You have removed this vehicle"); } return 1; }
Код:
(1623) : warning 225: unreachable code Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Warning. but i added like this Код:
CMD:deleteveh(playerid,params[]) { if(!IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid, -1, "You need to be in a vehicle to use this command"); return 0; { new vehicleid = GetPlayerVehicleID(playerid); DestroyVehicle(vehicleid); SendClientMessage(playerid, COLOUR_RED,"You have removed this vehicle"); } return 1; } |
CMD:deleteveh(playerid,params[]) { if(!IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid, -1, "You need to be in a vehicle to use this command"); return 0; // Never do this if you plan to... { // ... create brackets here... new vehicleid = GetPlayerVehicleID(playerid); DestroyVehicle(vehicleid); SendClientMessage(playerid, COLOUR_RED,"You have removed this vehicle"); } // ... and here return 1; }
CMD:deleteveh(playerid,params[]) { if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "You need to be in a vehicle to use this command"); { SendClientMessage(playerid, COLOUR_RED,"You removed vehicle"); new vehicleid = GetPlayerVehicleID(playerid); DestroyVehicle(vehicleid); } return 0; }
How can i make the command. You have to be in the vehicle to remove this vehicle
|
CMD:deleteveh(playerid,params[]) { if(IsPlayerInAnyVehicle(playerid)) { new vehicleid = GetPlayerVehicleID(playerid); DestroyVehicle(vehicleid); SendClientMessage(playerid, COLOUR_RED,"You have removed this vehicle"); } else { SendClientMessage(playerid, -1, "Your text."); } return 1; }