05.10.2010, 22:55
(
Последний раз редактировалось randomkid88; 04.03.2011 в 20:11.
Причина: Figured out how to do it!
)
Ok, it compiles fine now, but things aren't name-locked. This is what I have:
Everyone can use the commands if I do if(IsAuthorized(playerid)) as a conditional. Can anyone spot an error?
Thanks again
pawn Код:
forward IsAuthorized(playerid);
new Names[][MAX_PLAYER_NAME] =
{
"John_Doe",
// More names
};
public IsAuthorized(playerid)
{
for(new i = 0; i < sizeof(Names); i ++)
{
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
if(!strcmp(playername, Names[i], false)) {}
}
return 1;
}
Thanks again

