Disable commands in an area
#2

Depends what kind of area you think of. If you're talking about a sphere, use IsPlayerInRangeOfPoint in the same if-condition, where the strcmp is located, or just right before.
If you're talking about a square, use this IsPlayerInArea(playerid,maxX, maxY, minX, minY)
pawn Code:
IsPlayerInArea(playerid,Float:maxX, Float:maxY, Float:minX, Float:minY)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPosition(playerid, X, Y, Z);
if(X>=minX&&X<=maxX&&Y>=minY&&Y<=maxY)return 1;
else return 0;
}
I don't give guarantee about this code, cuz i just scripted this here right now.
Reply


Messages In This Thread
Disable commands in an area - by knackworst - 13.10.2010, 11:47
Re: Disable commands in an area - by DeathOnaStick - 13.10.2010, 12:18
Re: Disable commands in an area - by MBX97 - 13.10.2010, 12:38
Re: Disable commands in an area - by knackworst - 13.10.2010, 12:43
Re: Disable commands in an area - by knackworst - 13.10.2010, 13:29
Re: Disable commands in an area - by MBX97 - 13.10.2010, 13:45
Re: Disable commands in an area - by knackworst - 13.10.2010, 13:53
Re: Disable commands in an area - by DeathOnaStick - 13.10.2010, 16:23
Re: Disable commands in an area - by knackworst - 13.10.2010, 16:27
Re: Disable commands in an area - by Miguel - 13.10.2010, 16:38

Forum Jump:


Users browsing this thread: 2 Guest(s)