/repair cmd help
#3

// First you should probably change it to return the message instead of continue, as even if one statement turns false it will continue to execute the next if statement.

pawn Код:
CMD:repair(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "SERVER:Unknown Command.");
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "ERROR: You're not in a vehicle.");
   
    RepairVehicle(GetPlayerVehicleID(playerid));
    return 1;
}
Hope this helps.
Reply


Messages In This Thread
/repair cmd help - by saffierr - 14.07.2014, 21:39
Re : /repair cmd help - by ManuelNeuer - 14.07.2014, 22:02
Re: /repair cmd help - by azzerking - 14.07.2014, 22:05
Re: /repair cmd help - by saffierr - 14.07.2014, 23:23
Re: /repair cmd help - by saffierr - 14.07.2014, 23:25
Re: /repair cmd help - by HolisticDev - 14.07.2014, 23:29

Forum Jump:


Users browsing this thread: 2 Guest(s)