18.06.2014, 06:24
i have this on my OnPlayerText
i want that when a player send a message it should be
[Player] SAMP: HI
but it is displaying as
SAMP:[Player] SAMP: Hi
please help me to fix this
please
pawn Код:
public OnPlayerText(playerid, text[])
{
if (InAFK[playerid] == 1)
{
SendClientMessage(playerid, COLOR_RED, "{323299}[oXS]{FF0000} You are Now in AFK/BRB Mode! Try /back to speak!");
return 0;
}
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
if(PlayerInfo[playerid][AdminLevel] == 0)
{
new msg[256];
format(msg, sizeof(msg), "{323299}[Player]{FFFFFF} %s:{FFFFFF} %s",pname, text);
SendPlayerMessageToAll(GetPlayerColor(playerid), msg);
}
else if(PlayerInfo[playerid][AdminLevel] == 0 && PlayerInfo[playerid][VIPLevel] != 0)
{
new msg[256];
format(msg, sizeof(msg), "{323299}[VIP]{CC00FF} %s:{FFFFFF} %s",pname, text);
SendPlayerMessageToAll(GetPlayerColor(playerid), msg);
}
else if(PlayerInfo[playerid][AdminLevel] == 1)
{
new msg[256];
format(msg, sizeof(msg), "{323299}[Trial Admin]{82CAFA} %s:{FFFFFF} %s",pname, text);
SendPlayerMessageToAll(GetPlayerColor(playerid), msg);
}
else if(PlayerInfo[playerid][AdminLevel] == 2)
{
new msg[256];
format(msg, sizeof(msg), "{323299}[Admin]{82CAFA} %s:{FFFFFF} %s",pname, text);
SendPlayerMessageToAll(GetPlayerColor(playerid), msg);
}
else if(PlayerInfo[playerid][AdminLevel] == 3)
{
new msg[256];
format(msg, sizeof(msg), "{323299}[Moderator]{82CAFA} %s:{FFFFFF} %s",pname, text);
SendPlayerMessageToAll(GetPlayerColor(playerid), msg);
}
else if(PlayerInfo[playerid][AdminLevel] == 4)
{
new msg[256];
format(msg, sizeof(msg), "{323299}[Head Admin]{3BB9FF} %s:{FFFFFF} %s",pname, text);
SendPlayerMessageToAll(GetPlayerColor(playerid), msg);
}
else if(PlayerInfo[playerid][AdminLevel] == 5)
{
new msg[256];
format(msg, sizeof(msg), "{323299}[Lead Admin]{3BB9FF} %s:{FFFFFF} %s",pname, text);
SendPlayerMessageToAll(GetPlayerColor(playerid), msg);
}
else if(PlayerInfo[playerid][AdminLevel] == 6)
{
new msg[256];
format(msg, sizeof(msg), "{323299}[Co-Owner]{008000} %s:{FFFFFF} %s",pname, text);
SendPlayerMessageToAll(GetPlayerColor(playerid), msg);
}
else if(PlayerInfo[playerid][AdminLevel] == 7)
{
new msg[256];
format(msg, sizeof(msg), "{323299}[Owner]{008000} %s:{FFFFFF} %s",pname, text);
SendPlayerMessageToAll(GetPlayerColor(playerid), msg);
}
return 0;
}
[Player] SAMP: HI
but it is displaying as
SAMP:[Player] SAMP: Hi
please help me to fix this
please