[Help] How to do a /helpme command
#9

Untested but must work, just made in a minute.

pawn Код:
if(strcmp(cmdtext,"/helpme",true) == 0)
{
    new reason[128];
    if(sscanf(params,"s",reason)) return SendClientMessage(playerid,COLOR_RED,"* Syntax Error: /helpme [reason]");
    else
    {
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                if(IsPlayerAdmin(i))
                {
                    new Playername[MAX_PLAYER_NAME],string[128];
                    GetPlayerName(playerid,Playername,sizeof(Playername));
                    format(string,sizeof(string),"%s has requested help with the following reason: %s",Playername,reason);
                    SendClientMessage(i,0x55FF00FF,string); // Green
                }
            }
        }
    }
    return 1;
}
If you need the sscanf stock, if you don't have it already, you can find it here. Just place it anywhere in your code
Reply


Messages In This Thread
[Help] How to do a /helpme command - by PilotXtreme - 24.10.2010, 21:31
Re: [Help] How to do a /helpme command - by Camacorn - 24.10.2010, 21:35
Re: [Help] How to do a /helpme command - by Camacorn - 24.10.2010, 21:37
Re: [Help] How to do a /helpme command - by PilotXtreme - 24.10.2010, 21:43
Re: [Help] How to do a /helpme command - by Camacorn - 24.10.2010, 21:47
Re: [Help] How to do a /helpme command - by dLu - 24.10.2010, 21:49
Re: [Help] How to do a /helpme command - by Steven82 - 24.10.2010, 21:50
Re: [Help] How to do a /helpme command - by PilotXtreme - 24.10.2010, 22:04
Re: [Help] How to do a /helpme command - by Jochemd - 25.10.2010, 08:16

Forum Jump:


Users browsing this thread: 2 Guest(s)