SendToAdmins Stock has a parameter problem
#6

pawn Код:
CMD:a(playerid,params[])
{
    new string[128], chat[128];
    if(PlayerInfo[playerid][pAdminLevel] <= 1) return SendClientMessage(playerid,COLOR_GREY,"You're not authorized to use this command!");
    if(sscanf(params, "s[128]", chat)) return SendClientMessage(playerid,COLOR_GREY,"SYNTAX: /a(dmin) [message]");
    format(string,sizeof(string),"%s: %d",GetName(playerid), chat);
    SendToAdmins(COLOR_RED, string);
    return 1;
}
pawn Код:
stock SendToAdmins(COLOR,message[])//here we set params for this stock, [] means string/message
{
    for( new i = 0; i < MAX_PLAYERS; i++ )
    {
        if( PlayerInfo[i][pAdminLevel] >= 1 )
        {
            SendClientMessage( i,COLOR,message );
        }
    }
    return 1; //for everyone else return 0;
}
This should works
Reply


Messages In This Thread
SendToAdmins Stock has a parameter problem - by Cole_William - 11.07.2014, 20:44
Re: SendToAdmins Stock has a parameter problem - by SHE790 - 11.07.2014, 20:54
Re: SendToAdmins Stock has a parameter problem - by Cole_William - 11.07.2014, 21:01
Re : SendToAdmins Stock has a parameter problem - by Clad - 11.07.2014, 21:03
Re: Re : SendToAdmins Stock has a parameter problem - by SHE790 - 11.07.2014, 21:06
Re: SendToAdmins Stock has a parameter problem - by kizla - 11.07.2014, 21:15
Re: SendToAdmins Stock has a parameter problem - by Cole_William - 11.07.2014, 21:17

Forum Jump:


Users browsing this thread: 2 Guest(s)