/ahelp (not admin commands) (help)
#2

Just an example, might be a few errors & warnings (Not tested). It's just an example.
pawn Код:
new aReqHelp[MAX_PLAYERS];

OnPlayerConnect(playerid)
{
    aReqHelp[playerid] = 0;
    return 1;
}

CMD:ahelp(playerid, params[])
{
    new string[128];
    if(sscanf(params, "s[128]", string)) return SendClientMessage(playerid, -1, "USAGE: /ahelp [message]");
    for(new i = 0; i < MAX_PLAYERS; ++I)
    {
        if(PInfo[i][pAdmin] >= 1) // Admin variable Usually along the lines of PInfo[i][pAdmin] >= 1
        {
            SendClientMessage(playerid, -1, string);
        }
    }
    aReqHelp[playerid] = 1;
    return 1;
}

CMD:arespond(playerid, params[])
{
    new pID, string[128];
    if(sscanf(params, "us[128]", pID, string)) return SendClientMessage(playerid, -1, "USAGE: /arespond [id] [message]");
    if(PInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid, -1, "You're not allowed to use this command.");
    if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, -1, "Player not connected");
    if(aReqHelp[pID] == 0) return SendClientMessage(playerid, -1, "That player does not require help.");
    else SendClientMessage(pID, -1, string); aReqHelp[pID] = 0;
    return 1;
}
Reply


Messages In This Thread
/ahelp (not admin commands) (help) - by zT KiNgKoNg - 05.09.2012, 18:25
Re: /ahelp (not admin commands) (help) - by ryansheilds - 05.09.2012, 18:44
Re: /ahelp (not admin commands) (help) - by zT KiNgKoNg - 05.09.2012, 18:45
Re: /ahelp (not admin commands) (help) - by Cameltoe - 05.09.2012, 18:46
Re: /ahelp (not admin commands) (help) - by ryansheilds - 05.09.2012, 20:07

Forum Jump:


Users browsing this thread: 3 Guest(s)