21.08.2011, 21:22
Yes. Use IsPlayerInRangeOfPoint.
pawn Code:
CMD:zombieo(playerid, params[])
{
if(gTeam[playerid] == TEAM_ZOMBIE)
{
if(IsPlayerInRangeOfPoint(playerid, 15, -2315.3188476563, -2169.1782226563, 35))
{
MoveObject(zombiegate, -2315.3188476563, -2169.1782226563, 35, 5);
SendClientMessage(playerid, 0xFFFFFF, "You take remote console and open the gate...");
}
else
{
SendClientMessage(playerid, 0XFFFFFF, "You need to be near the gate to open it");
}
}
else
{
SendClientMessage(playerid, 0xAA3333AA, "You don't Have remote console of this gate.");
}
return 1;
}