02.02.2011, 13:02
hello, i have a problem with my isplayerinrangeofpoint
when I enter area it works, but when i leave or just join the server it spam me with "You left test"
help please
when I enter area it works, but when i leave or just join the server it spam me with "You left test"
pawn Код:
forward Test();
public Test()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i, 2.0, 252.3922,117.3293,1003.2188))
{
if(Send[i] == 0)
{
SendClientMessage(i,Blue,"Welcome to Test!");
Send[i] = 1;
}
}
else
{
SendClientMessage(i,Yellow, "You left Test");
Send[i] = 0;
}
}
return 1;
}
pawn Код:
new Send[MAX_PLAYERS] = 0;
pawn Код:
SetTimer("Test", 2000, true);

