SA-MP Forums Archive
chat help. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: chat help. (/showthread.php?tid=87020)



chat help. - coole210 - 17.07.2009

Okay i want to limit the chat radius in OnPlayerText. I have used LimitGlobalChatRadius, but i want the players to chat in their team colors, Swat player :

Coole210: Blablabla

The reason i want this in OnPlayerText because i am making a clan registration. I got the loading and saving but not commands because i need the players to chat in their team colors + tag without having to add for example [BLA] to their name. You enter GM and as Coole210 but when you chat or shout it says [BLA]Coole210: blablabla


Re: chat help. - Vince - 17.07.2009

Search for ProxDetector.
Then format your text string: format(string, sizeof(string), "* [TAG]%s: %s", playername, text);


Re: chat help. - coole210 - 17.07.2009

I tried prox detector, it worked but it sends 2 messages!


Re: chat help. - Pawno_Master - 17.07.2009

if you chat than you're automatticly youre teamcolor if your defined it well?


Re: chat help. - Vince - 17.07.2009

Quote:
Originally Posted by coole210
I tried prox detector, it worked but it sends 2 messages!
You need to return 0 at OnPlayerText.


Re: chat help. - coole210 - 17.07.2009

I return 0; but still 2 messages !

pawn Код:
new string[128],name[17];
  GetPlayerName(playerid,name,sizeof(name));
    if(gTeam[playerid] == TEAM_POLICE)
    {
    format(string,sizeof(string),"%s: %s",name,text);
    ProxDetector(15.0,playerid,string,TEAM_POLICE_COLOR,TEAM_POLICE_COLOR,TEAM_POLICE_COLOR,TEAM_POLICE_COLOR,TEAM_POLICE_COLOR);
    return 1;
    }
Whats wrong with that?


Re: chat help. - coole210 - 18.07.2009

Nobody has an answer? I've seen this many times, just can't figure it out


Re: chat help. - Pawno_Master - 18.07.2009

maybve you can change the format in a SendClientMessage?


SendClientMessage(playerid,0xAA3333AA,string[128]);