Repair command with money
#2

Hi!

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

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: 4 Guest(s)