13.04.2009, 19:20
I tryed a thing here, it kinda work, but not work.. xD
on top off:
When player login:
The command:
When I'm in with a friend and i use /a not my name comming but hes.. And i did me self sivilian but then it com on hes screen that he was not a admin. Help?
on top off:
Код:
enum pInfo
{
Admin
}
new PlayerInfo[MAX_PLAYERS][pInfo];
Код:
if(dini_Int(file, "admin") >1)
{
PlayerInfo[playerid][Admin] = 1;
}
Код:
if(strcmp(cmdtext, "/a", true, 2) == 0 )
{
if(dini_Int(file, "admin") >1)
{
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(PlayerInfo[i][Admin] == PlayerInfo[playerid][Admin])
{
new pname2[256];
GetPlayerName(playerid, pname2, sizeof(pname2));
new string[256];
format(string, 256, "[ADMIN]%s: %s", pname, cmdtext[3]);
SendClientMessage(i, COLOR_ORANGE, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "You are not admin!");
}
return 1;
}

