Repair command with money
#1

I tried to create a repair command:

pawn Код:
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,PInfo[playerid][Money]-2500);
    SendClientMessage(playerid, COLOR_LIGHTGREEN,"You repaired the vehicle (-$2500)");
    return 1;
    }
This has to check for the Money of the player, if its less then 2500 return a message,
If its enough AND hes in a vehicle, repair the vehicle he is in and give the player -2500 money ...
Reply


Messages In This Thread
Repair command with money - by luckie12 - 30.03.2016, 12:16
Re: Repair command with money - by Mencent - 30.03.2016, 12:19
Re: Repair command with money - by luckie12 - 30.03.2016, 12:27
Re: Repair command with money - by theonethatownz - 30.03.2016, 13:01
Re: Repair command with money - by luckie12 - 30.03.2016, 13:27
Re: Repair command with money - by Mencent - 30.03.2016, 13:28
Re: Repair command with money - by luckie12 - 30.03.2016, 13:48
Re: Repair command with money - by Mencent - 30.03.2016, 13:50
Re: Repair command with money - by luckie12 - 30.03.2016, 13:51
Re: Repair command with money - by Mencent - 30.03.2016, 13:52

Forum Jump:


Users browsing this thread: 5 Guest(s)