Problem with ID 0
#3

Try this one:
pawn Код:
public OnPlayerText(playerid, text[])
{
new string[256];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
for(new i = 0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(playerid == i) continue;   // I have added this line
if(IsPlayerNearPlayer(i, playerid, 20.0))
{
format(string,sizeof(string),"%s : %s",name,text);
ProxDetector(20.0,playerid,string,GetPlayerColor(p layerid),GetPlayerColor(playerid),GetPlayerColor(p layerid),GetPlayerColor(playerid),GetPlayerColor(p layerid));
return 0;
} else {
SendClientMessage(playerid, COLOR_WHITE, "[INFO] You are too far, no one hear you ! ");
return 0;
}

}
}
return 0;
}
Reply


Messages In This Thread
Problem with ID 0 - by Takumi.WS - 09.08.2011, 16:46
Re: Problem with ID 0 - by Shadoww5 - 09.08.2011, 17:03
Re: Problem with ID 0 - by Norck - 09.08.2011, 17:11
Re: Problem with ID 0 - by Cameltoe - 09.08.2011, 17:16
Re: Problem with ID 0 - by Takumi.WS - 09.08.2011, 17:44
Re: Problem with ID 0 - by Cameltoe - 09.08.2011, 17:48
Re: Problem with ID 0 - by Takumi.WS - 09.08.2011, 18:01
Re: Problem with ID 0 - by Cameltoe - 09.08.2011, 18:07
Re: Problem with ID 0 - by Takumi.WS - 09.08.2011, 18:14
Re: Problem with ID 0 - by Cameltoe - 09.08.2011, 18:19

Forum Jump:


Users browsing this thread: 1 Guest(s)