How can i ?
#1

Sup guys,
how can i make a whitelist with usernames witch can acces the command
example
if nick
CraTzy
Yaman
YaZ
Duraned16
in whitelist they can acces the command /fixme
Reply
#2

Somewhere on top
pawn Код:
PlayerCanUseCmd(playerid)
{
    static const nicks[][] = {!"CraTzy", !"Yaman", !"YaZ", !"Duraned16"}; // your nicks here
    static pname[MAX_PLAYER_NAME + 1];
    GetPlayerName(playerid, pname, sizeof(pname));

    for(new i = 0; i < sizeof(nicks); i++)
        if(!strcmp(nicks[i], pname))
            return 1;

    return 0;
}
in cmd
pawn Код:
if(!PlayerCanUseCmd(playerid)) return SendClientMessage(playerid,-1,"You can't use this command :<");
Reply
#3

i hope it works
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)