i need !fix cmd for vehicle with pay $300
I dunno maybe
public OnPlayerText
if(strcmp(text, "fix", 1)==0)
{
if(!IsPlayerInAnyVehicle(playerid)) SendClientMessage(playerid, 0xFF0000AA, "You're on foot");
else {
new Float:vhp, vid = GetPlayerVehicleID(playerid);
GetVehicleHealth(vid, vhp);
if(vhp == 1000) SendClientMessage(playerid, 0xFF0000AA, "Your vehicle is okay");
else{
new cash = GetPlayerMoney(playerid);
if(cash <= 299) SendClientMessage(playerid, 0xFF0000AA, "You're poor as fuck");
else {
SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been repaired");
SetVehicleHealth(vid, 1000);
SetPlayerMoney(playerid, cash - 300);}
}
}
}
}