SA-MP Forums Archive
Native help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Native help (/showthread.php?tid=162629)



Native help - willsuckformoney - 24.07.2010

Does anyone know that native IsPlayerInAreaOf or something like that not IsPlayerInRageOfPoint??

i need it for teh script


Re: Native help - TouR - 24.07.2010

You mean with area names?


Re: Native help - Carlton - 24.07.2010

pawn Код:
public IsPlayerInArea(playerid, Float:maxx, Float:maxy, Float:maxz, Float:minx, Float:miny, Float:minz)
{
   new Float:x, Float:y, Float:z;
   GetPlayerPos(playerid, x, y, z);
   if(x < maxx && y < maxy && z < maxz && x > minx && y > miny && z > minz) return 1;
   return 0;
}



Re: Native help - willsuckformoney - 24.07.2010

well maybe if i understand what your saying^^ but i mean like i seen it before it was IsPlayerRangeOfArea or something like that i cant remember it

EDIT: Yeah carlton that but can u explain the maxx maxy maxz minx miny minz that stuff?


Re: Native help - TouR - 24.07.2010

MAX(x,y,z) o----------
| |
| |
| |
----------oMIN(x,y,z)

I think its osmething like this


EDIT: Okay fail :P


Re: Native help - willsuckformoney - 24.07.2010

lol this confusing me now like i need it so that i can do something like this

pawn Код:
forward IsPlayerRangeOfArea(playerid, Float:minx, Float:miny, Float:maxx, Float:maxy);
pawn Код:
public IsPlayerRangeOfArea(playerid, Float:minx, Float:miny, Float:maxx, Float:maxy)
{
    IsPlayerRangeOfArea(playerid, -2135.883, 136.4459, -2000.689, 353.4189);
    SendClientMessage(playerid, COLOR_RED, "WARNING: You are in Workers Zone");
    return 1;
}
I has that in my script atm for testing see if it works, no errors no warning but dont show the message, i want something like that and what carlton said looked like help but i dont understand it