11.07.2014, 22:44
Like the title says, no server log entries.
pawn Код:
CMD:accepthelp(playerid, params[])
{
new playerb, string[128];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pHelper] < 2) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /accepthelp [playerid]");
if(HelpPending[playerb] == 0) return SendClientMessage(playerid, COLOR_GREY, "This player doesn't have a pending help request.");
if(Helping[playerid] != -1) return SendClientMessage(playerid, COLOR_GREY, "You are already helping someone.");
Helping[playerid] = playerb;
Helping[playerb] = playerid;
format(string, sizeof(string), "* %s %s has accepted your help request, please wait.", RPHLN(playerid), RPN(playerid));
SendClientMessage(playerb, COLOR_GREEN, string);
format(string, sizeof(string), "* You have accepted %s help request, use /helpermenu to start helping him.", RPN(playerb));
SendClientMessage(playerid, COLOR_GREEN, string);
HelpPending[playerb] = 0;
return 1;
}