25.06.2012, 09:14
Hello everyone I have a big problem shtot then began to write my name goes double here's the code I tried to do Prefix but since I write a sample test shows [owner] Rumen_Dimitrov: test and below Rumen_Dimitrov: test who can help me
I would be grateful if you help me
Translated by ****** Translator
I would be grateful if you help me
PHP код:
public OnPlayerText(playerid, text[])
{
if(PlayerInfo[playerid][pAdmin] == 3)
{
new pName[MAX_PLAYER_NAME], String[128], Prefix[] = "{FF3333}[Owner]";
GetPlayerName(playerid, pName, 24);
format(String, sizeof(String), "%s{AFAFAF}%s: %s", Prefix, pName, text);
SendClientMessageToAll(-1,String);
}
if(PlayerInfo[playerid][pAdmin] == 2)
{
new pName[MAX_PLAYER_NAME], String[128], Prefix[] = "{33AA33}[Head-Admin]";
GetPlayerName(playerid, pName, 24);
format(String, sizeof(String), "%s{AFAFAF}%s: %s", Prefix, pName, text);
SendClientMessageToAll(-1,String);
}
if(PlayerInfo[playerid][pAdmin] == 1)
{
new pName[MAX_PLAYER_NAME], String[128], Prefix[] = "{FF9900}[Moderator]";
GetPlayerName(playerid, pName, 24);
format(String, sizeof(String), "%s{AFAFAF}%s: %s", Prefix, pName, text);
SendClientMessageToAll(-1,String);
}
if(PlayerInfo[playerid][pAdmin] == 0)
{
new pName[MAX_PLAYER_NAME], String[128], Prefix[] = "{E100E1}[Member]";
GetPlayerName(playerid, pName, 24);
format(String, sizeof(String), "%s{AFAFAF}%s: %s", Prefix, pName, text);
SendClientMessageToAll(-1,String);
}
return 1;
}