30.03.2016, 12:19
Hi!
Do it like this:
Do it like this:
PHP код:
CMD:repairv(playerid)
{
if(PInfo[playerid][Money] < 2500) return SendClientMessage(playerid, COLOR_RED, "You dont have enough money! ($2500)");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "You are not in a vehicle!");
RepairVehicle(GetPlayerVehicleID(playerid));
GivePlayerMoney(playerid,-2500);
PInfo[playerid][Money] -= 2500;
SendClientMessage(playerid, COLOR_LIGHTGREEN,"You repaired the vehicle (-$2500)");
return 1;
}