How to make range chat? - 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: How to make range chat? (
/showthread.php?tid=475742)
How to make range chat? -
Le3aT - 14.11.2013
I have some problems as always
First:
How can i make range chat
Ex: If they are near they can see the chat if they aren't they won't
Last one :
How can i erase the player markers Like RP servers
Thanks
Re: How to make range chat? -
Twizted - 14.11.2013
1.) Proximity chat:
https://sampforum.blast.hk/showthread.php?tid=336052
2.) Removing the underscore when the player writes something - SSCANF is needed - (I believe this is what you want):
pawn Код:
stock RemoveUnderScore(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
for(new i = 0; i < MAX_PLAYER_NAME; i++)
{
if(name[i] == '_') name[i] = ' ';
}
return name;
}
//to call the function, use:
RemoveUnderScore(playerid);
//common use would be:
public OnPlayerText(playerid, text[])
{
RemoveUnderScore(playerid);
return 0;
}