28.11.2008, 22:18
Try this then
Код:
if(strcmp(cmdtext,"/cargodon",true) == 0) { if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "You are not in any vehicle to use godmode."); new vehicleid = GetPlayerVehicleID(playerid); SetVehicleHealth(vehicleid,99999); SendClientMessage(playerid, COLOR_GREEN, "Vehicles godmode turned on."); return 1; }
Код:
if(strcmp(cmdtext,"/cargodoff",true) == 0) { if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "You are not in any vehicle to turn godmode off."); new vehicleid = GetPlayerVehicleID(playerid); SetVehicleHealth(vehicleid,1000); SendClientMessage(playerid, COLOR_RED, "Vehicles godmode turned off."); return 1; }