How can i ? - 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: How can i ? (
/showthread.php?tid=592934)
How can i ? -
CraTzy - 31.10.2015
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
Re: How can i ? -
Jefff - 01.11.2015
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 :<");
Re: How can i ? -
CraTzy - 02.11.2015
i hope it works