28.03.2012, 13:22
(
Последний раз редактировалось Avi57; 29.03.2012 в 10:44.
)
Deleted ..............
if(strcmp(cmd, "/fix", true) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid, 2, 2005.6378,-2453.3921,13.5469)) return SendClientMessage(playerid, 0xFF0000, "You must be at the specified location to use this command!");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000, "You must be in a vehicle to use this command!");
if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, 0xFF0000 "You don't have enough cash to repair your vehicle!");
GivePlayerMoney(playerid, -1000);
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, -1, "Your vehicle has been repaired!");
return 1;
}
if(strcmp(cmd, "/fuel", true) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid, 2, 2005.6378,-2453.3921,13.5469)) return SendClientMessage(playerid, 0xFF0000, "You must be at the specified location to use this command!");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000, "You must be in a vehicle to use this command!");
//Refuel script here.
SendClientMessage(playerid, -1, "Your vehicle's fuel tank has been refilled!");
return 1;
}
I hope this is what you're looking for. pawn Code: if(strcmp(cmd, "/fix", true) == 0) { if(!IsPlayerInRangeOfPoint(playerid, 2, 2005.6378,-2453.3921,13.5469)) return SendClientMessage(playerid, 0xFF0000, "You must be at the specified location to use this command!"); if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000, "You must be in a vehicle to use this command!"); if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, 0xFF0000 "You don't have enough cash to repair your vehicle!"); GivePlayerMoney(playerid, -1000); RepairVehicle(GetPlayerVehicleID(playerid)); SendClientMessage(playerid, -1, "Your vehicle has been repaired!"); return 1; } if(strcmp(cmd, "/fuel", true) == 0) { if(!IsPlayerInRangeOfPoint(playerid, 2, 2005.6378,-2453.3921,13.5469)) return SendClientMessage(playerid, 0xFF0000, "You must be at the specified location to use this command!"); if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000, "You must be in a vehicle to use this command!"); //Refuel script here. SendClientMessage(playerid, -1, "Your vehicle's fuel tank has been refilled!"); return 1; } |
[19:22:09] You must be at the specified location to use this command! [19:22:23] You must be at the specified location to use this command!