Quote:
Originally Posted by Ironboy
pawn Код:
public OnPlayerText(playerid, text[]) { new string[256], pname[MAX_PLAYER_NAME]; GetPlayerName(playerid,pname,sizeof(pname)); for(new i=0;i<MAX_PLAYERS;i++) { if(IsPlayerConnected(i) && GetDistanceBetweenPlayers(playerid,i) < 10 ) { //those who stands within 10 metres can only see. format(string, sizeof(string), "[WHISPER] %s[%d]: %s",pname,playerid,params); SendClientMessage(i,COLOR_YELLOW,string);}} return 1; }
|
For some reason whenever someone types the text it sends their message twice.