20.11.2018, 18:10
Okay i maked my command so if you dont have 500 money you can't fix your vehicle.
But when i use the command, it sends the message that you dont have money, but still fix the vehicle and gets the player money. How to fix it?
Here's the code:
But when i use the command, it sends the message that you dont have money, but still fix the vehicle and gets the player money. How to fix it?
Here's the code:
Код:
if(GetPlayerMoney(playerid) < 500)
{
SendClientMessage(playerid, COLOR_WHITE, "You don't have money!");
}
if(IsPlayerInAnyVehicle(playerid))
{
RepairVehicle(GetPlayerVehicleID(playerid));
GivePlayerMoney(playerid, -500);
SendClientMessage(playerid, COLOR_WHITE, "You successfully repaired your vehicle, and this costs you $500");
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "You are not in vehicle");
}

