26.11.2015, 14:32
Those are not the issue as I've successful used them in other commands.
Sure
Sure
PHP код:
command(acceptrelease, playerid, params)
{
if(!IsADocGuard(playerid)) return SendClientMessageEx(playerid, COLOR_GREY, "You must be a DOC Guard to use this command.");
new id;
if(sscanf(params, "u", id)) return SendClientMessageEx(playerid, COLOR_GREY, "Usage: /acceptrelease [player]");
if(strfind(PlayerInfo[id][pPrisonReason], "[DNRL]", true) == -1)
{
new string[128];
ReleasePlayerFromPrison(playerid);
format(string, sizeof(string), "You have accepted %s's release request.", GetPlayerNameEx(id));
SendClientMessageEx(playerid, COLOR_GREY, string);
}
else SendClientMessage(playerid, COLOR_GRAD1, "You cannot use this command on an inmate who has not served their initial sentence.");
return 1;
}