PDA

View Full Version : How to make range chat?


Le3aT
14/11/2013, 06:18 PM
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

Twizted
14/11/2013, 06:23 PM
1.) Proximity chat: http://forum.sa-mp.com/showthread.php?t=336052

2.) Removing the underscore when the player writes something - SSCANF is needed - (I believe this is what you want):

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;
}