public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp("/repair", cmdtext))
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle!");
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been successfully repaired!");
return 1;
}
}
if(IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z))
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp("/repair", cmdtext))
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle!");
if(!IsPlayerInRangeOfPoint(...)) return SendClientMessage(playerid, 0xFFFFFFFF, "You must be at the repair place to repair things! loln0blord");
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been successfully repaired!");
return 1;
}
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp("/repair", cmdtext))
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle!");
if(!IsPlayerInRangeOfPoint(...)) return SendClientMessage(playerid, 0xFFFFFFFF, "You must be at the repair place to repair things! loln0blord");
if(GetPlayerMoney(playerid) <= 500) return SendClientMessage(playerid, 0xFFFFFFFF, "You poor fuck, you can't afford this");
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been successfully repaired!");
GivePlayerMoney(playerid, -500);
return 1;
}
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp("/repair", cmdtext))
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not in a vehicle!");
if(!IsPlayerInRangeOfPoint(...)) return SendClientMessage(playerid, 0xFFFFFFFF, "You must be at the repair place to repair things! loln0blord");
if(GetPlayerMoney(playerid) <= 500) return SendClientMessage(playerid, 0xFFFFFFFF, "You poor fuck, you can't afford this");
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been successfully repaired!");
GivePlayerMoney(playerid, -500);
return 1;
}
}
if(GetPlayerMoney(playerid) >= 500) {
GivePlayerMoney(playerid, -500);
}
else { // messages }
pawn Код:
This however, you'll want to check to ensure he even has 500$ to begin with: pawn Код:
|
if(GetPlayerMoney(playerid) <= 500) return SendClientMessage(playerid, 0xFFFFFFFF, "You poor fuck, you can't afford this");
if(GetPlayerMoney(playerid) >= 500) {
GivePlayerMoney(playerid, -500);
}
pardon me but i have done that already, maybe in a wrong way, correct me if i'm wrong but
pawn Код:
pawn Код:
|