SA-MP Forums Archive
/helpme command - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /helpme command (/showthread.php?tid=362005)



/helpme command - (_AcE_) - 23.07.2012

I have no idea how to do this, but can someone make a /helpme command in zmcd

I want it to do /helpme and they type in what they need help with and it is sent to admins.


Re: /helpme command - Kindred - 23.07.2012

Do something like this:

pawn Код:
CMD:helpme(playerid, params[])
{
    if(!IsPlayerConnected(playerid)) return 1;
    new question[128];
    if(sscanf(params, "s[128]", question)) return SendClientMessage(playerid, -1, "Usage: /helpme [question]");
    SendMessageToAdmins(-1, question);
    return 1;
}

stock SendMessageToAdmins(Color, Question[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(AdminVariableHere[i] >= 1)
        {
            SendClientMessage(i, Color, Question);
        }
    }
    return 1;
}
Seriously try to ****** your question, I'm POSITIVE there are probably heaps of questions like this.

This requires sscanf, zcmd, and the custom stock I provided.

Change -1 to the color you want to use.