/help command for player
#5

Quote:
Originally Posted by Jarnu
Посмотреть сообщение
pawn Код:
CMD:helpme(playerid, params[])
{
    new str[128], Name1[MAX_PLAYER_NAME];
    if(sscanf(params,"s", str))
    {
     SendClientMessage(playerid, COLOR_RED,"CORRECT USAGE: /helpme [text]");
     return 1;
    }
    GetPlayerName(playerid, Name1, sizeof(Name1));
    format(str, sizeof(str),"{00FFFF}[HELP MSG From %s]:{00FFF0} %s",Name1, str);
    MessageToAdmins(COLOR_RED, str);
    SendClientMessage(playerid, yellow,"Your Request has been sent to online Administrators.");
    return 1;
}
MessageToAdmins
pawn Код:
forward MessageToAdmins(color,const string[]);
public MessageToAdmins(color,const string[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) == 1) if (PlayerInfo[i][Level] >= 1) SendClientMessage(i, color, string);
    }
    return 1;
}
You need to set that according to your script.
I have added On top of script (Under my Gamemode)

pawn Код:
new AccInfo[MAXPLAYER];
pawn Код:
forward MessageToAdmins(color,const string[]);
public MessageToAdmins(color,const string[])
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) == 1) if (AccInfo[i][Level] >= 1) SendClientMessage(i, color, string);
    }
    return 1;
}
After compiling I got warnings:

Код:
error 001: expected token: ")", but found "["
error 029: invalid expression, assumed zero
error 017: undefined symbol "Level"
fatal error 107: too many error messages on one line
Line..

Код:
if(IsPlayerConnected(i) == 1) if (AccInfo[i][Level] >= 1) SendClientMessage(i, COLOR_RED, string);
Reply


Messages In This Thread
/help command for player - by kbalor - 26.08.2012, 15:57
Re: /help command for player - by detter - 26.08.2012, 16:12
Re: /help command for player - by Jarnu - 26.08.2012, 16:18
Re: /help command for player - by kbalor - 26.08.2012, 16:51
Re: /help command for player - by kbalor - 26.08.2012, 16:59

Forum Jump:


Users browsing this thread: 1 Guest(s)