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;
}
PlayerInfo[playerid][pAdmin] = 0;
[HELPER] name: blablabla
Ignore DaRk_RaiN's post, the code posted there has not been tested - which is a requirement of posting code answers here so as to not further confuse question askers. I can tell you now it is wrong.
I'd also say ignore everyone else's post if you actually want to learn something instead of just being spoon-fed answers like an idiot, but that's up to you. |
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;
}