OnPlayerText - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerText (
/showthread.php?tid=411863)
OnPlayerText -
EmuS - 30.01.2013
hi, create a clan chat for my server, and everything works but the chat does not work normally, bone is not listed, help.
Code:
pawn Код:
public OnPlayerText(playerid, text[])
{
if(text[0] == '$' && PlayerGang[playerid] > 0)
{
new string[256], nombre[MAX_PLAYER_NAME];
GetPlayerName(playerid, nombre, MAX_PLAYER_NAME);
format(string,sizeof(string),"* [Clan] %s [%i]: %s",nombre,playerid,text[1]);
ForEach(i,MAX_PLAYERS)
{
if (IsPlayerAdminLevel(playerid, 4)) SendClientMessage(i,0x00FF00FF,string);
else if(PlayerGang[i] == PlayerGang[i]) SendClientMessage(i,0x00FFFFFF,string);
}
return 0;
}
return 0;
}
Re: OnPlayerText -
Roach_ - 31.01.2013
Try this:
pawn Код:
public OnPlayerText(playerid, text[])
{
if(text[0] == '$' && PlayerGang[playerid] > 0)
{
new string[256], nombre[MAX_PLAYER_NAME];
GetPlayerName(playerid, nombre, MAX_PLAYER_NAME);
format(string, sizeof(string), "* [Clan] %s [%i]: %s", nombre, playerid, text[1]);
ForEach(i,MAX_PLAYERS)
{
if(IsPlayerAdminLevel(playerid, 4)) SendClientMessage(i, 0x00FF00FF, string);
else if(PlayerGang[i] == PlayerGang[playerid]) SendClientMessage(i, 0x00FFFFFF, string);
}
return 0;
}
return 1;
}