27.07.2012, 11:05
PHP код:
public OnPlayerText(playerid, text[])
{
if(PlayerInfo[playerid][pAdmin] == 8)
{
new pName[MAX_PLAYER_NAME], String[128];
GetPlayerName(playerid, pName, 24);
format(String, sizeof(String), "{FF3333}[Owner]{33CCFF}%s: %s", pName, text);
SendClientMessageToAll(-1,String);
return 0;
}
else if(PlayerInfo[playerid][pAdmin] == 7)
{
new pName[MAX_PLAYER_NAME], String[128];
GetPlayerName(playerid, pName, 24);
format(String, sizeof(String), "{FF3333}[Co-Owner]{33CCFF}%s: %s", pName, text);
SendClientMessageToAll(-1,String);
return 0;
}
else if(PlayerInfo[playerid][pAdmin] == 6)
{
new pName[MAX_PLAYER_NAME], String[128];
GetPlayerName(playerid, pName, 24);
format(String, sizeof(String), "{33AA33}[Head-Admin]{AFAFAF}%s: %s", pName, text);
SendClientMessageToAll(-1,String);
return 0;
}
else if(PlayerInfo[playerid][pAdmin] == 5)
{
new pName[MAX_PLAYER_NAME], String[128];
GetPlayerName(playerid, pName, 24);
format(String, sizeof(String), "{33CCFF}[Scripter]{AFAFAF}%s: %s", pName, text);
SendClientMessageToAll(-1,String);
return 0;
}
else if(PlayerInfo[playerid][pAdmin] == 4)
{
new pName[MAX_PLAYER_NAME], String[128];
GetPlayerName(playerid, pName, 24);
format(String, sizeof(String), "{0088FF}[Admin]{AFAFAF}%s:%s", pName, text);
SendClientMessageToAll(-1,String);
return 0;
}
else if(PlayerInfo[playerid][pAdmin] == 3)
{
new pName[MAX_PLAYER_NAME], String[128];
GetPlayerName(playerid, pName, 24);
format(String, sizeof(String), "{FF9900}[Moderator]{AFAFAF}%s:%s", pName, text);
SendClientMessageToAll(-1,String);
return 0;
}
else if(PlayerInfo[playerid][pAdmin] == 2)
{
new pName[MAX_PLAYER_NAME], String[128];
GetPlayerName(playerid, pName, 24);
format(String, sizeof(String), "{9ACD32}[Mega VIP]{AFAFAF}%s:%s", pName, text);
SendClientMessageToAll(-1,String);
return 0;
}
else if(PlayerInfo[playerid][pAdmin] == 1)
{
new pName[MAX_PLAYER_NAME], String[128];
GetPlayerName(playerid, pName, 24);
format(String, sizeof(String), "{FFFF00}[VIP]{AFAFAF}%s:%s", pName, text);
SendClientMessageToAll(-1,String);
return 0;
}
else if(PlayerInfo[playerid][Police] == 3)
{
new pName[MAX_PLAYER_NAME], String[128];
GetPlayerName(playerid, pName, 24);
format(String, sizeof(String), "{0088FF}[Leader]%s:%s", pName, text);
SendClientMessageToAll(-1,String);
return 0;
}
else if(PlayerInfo[playerid][Police] == 2)
{
new pName[MAX_PLAYER_NAME], String[128];
GetPlayerName(playerid, pName, 24);
format(String, sizeof(String), "{0088FF}[Officer]%s:%s", pName, text);
SendClientMessageToAll(-1,String);
return 0;
}
else if(PlayerInfo[playerid][Police] == 1)
{
new pName[MAX_PLAYER_NAME], String[128];
GetPlayerName(playerid, pName, 24);
format(String, sizeof(String), "{0088FF}[Cadet]%s:%s", pName, text);
SendClientMessageToAll(-1,String);
return 0;
}
return 0;
}