Onplayertext
[pawn]else if(strcmp(cmd, "!fix", true)==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 buddy");
else {
SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been repaired");
SetVehicleHealth(vid, 1000);
DecPlayerHandCash( playerid, 300 );}
}
}
}
[/pawn]