13.12.2012, 14:44
So here is my OnPlayerText Script
On my register function i have
But whenever a player connects to my server and types, no matter what admin rank.. even if they're rank 5
it will say
Any reason? Thanks
pawn Код:
public OnPlayerText(playerid, text[])
{
if(PlayerInfo[playerid][pAdmin] != 1)
{
new admintext[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof (name));
format(admintext, sizeof (admintext), "{00FF00}[HELPER] {FFFFFF}%s: %s", name,text);
SendClientMessageToAll(-1, admintext);
return 0;
}
if(PlayerInfo[playerid][pAdmin] != 2)
{
new admintext[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof (name));
format(admintext, sizeof (admintext), "{F6FF00}[MODERATOR] {FFFFFF}%s: %s", name,text);
SendClientMessageToAll(-1, admintext);
return 0;
}
if(PlayerInfo[playerid][pAdmin] != 4)
{
new admintext[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof (name));
format(admintext, sizeof (admintext), "{B30000}[ADMINISTRATOR] {FFFFFF}%s: %s", name,text);
SendClientMessageToAll(-1, admintext);
return 0;
}
if(PlayerInfo[playerid][pAdmin] != 5)
{
new admintext[128], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof (name));
format(admintext, sizeof (admintext), "{FF8800}[DIRECTOR] {FFFFFF}%s: %s", name,text);
SendClientMessageToAll(-1, admintext);
return 0;
}
return 1;
}
pawn Код:
PlayerInfo[playerid][pAdmin] = 0;
it will say
Код:
[HELPER] name: blablabla