13.10.2010, 12:18
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)
I don't give guarantee about this code, cuz i just scripted this here right now.
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;
}