Quote:
Originally Posted by [J]ulian
pawn Код:
new EnZona[MAX_PLAYERS]; public OnPlayerUpdate(playerid) { if(IsPlayerInRangeOfPoint(playerid, Range, X, Y, Z); { EnZona[playerid] = 1; SendClientMessage(playerid, -1, "Bienvenido a ... ."); } else { if(EnZona[playerid] == 1) { SendClientMessage(playerid, -1, "Saliste de ... ."); EnZona[playerid] = 0; } } return 1; }
No lo probй, lo hice acб en el foro, calculo que funcionarб. xD
|
Jaja, tremendo spam hace eso xD
pawn Код:
public OnPlayerUpdate(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, Range, X, Y, Z) && EnZona[playerid] == 0) //Cambia tus coordenadas
{
EnZona[playerid] = 1;
SendClientMessage(playerid, -1, "Bienvenido a ... .");
}
else if(!IsPlayerInRangeOfPoint(playerid, Range, X, Y, Z) && EnZona[playerid] == 1)
{
SendClientMessage(playerid, -1, "Saliste de ... .");
EnZona[playerid] = 0;
}
return 1;
}
Aca lo editй, pero no te recomiendo usar IsPlayerInRangeOfPoint dentro de OnPlayerUpdate, hace un timer mejor.