SA-MP Forums Archive
Help Please - 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)
+--- Thread: Help Please (/showthread.php?tid=593176)



Help Please - Alpha000 - 02.11.2015

Hello Everyone.
I want to create a function which checks that if a player is in a specified area of south, east, west and north boundaries with specified land id( which that player owns)

For Example i tried here:

PHP код:
stock IsPlayerAtLand(playerid, landid)
{
    new 
Float: landMinX == west, Float: landMiny == south;
    if 
GetPlayerPos(playerid, west, south);
    return 
true;
} 
I am sure its wrong can anyone help me with it?


Re: Help Please - AbyssMorgan - 02.11.2015

provide more information because this function is useless ~.~

you want to check the coordinates, or built areas ?


Re: Help Please - Alpha000 - 02.11.2015

built areas NOT IsPlayerInRangeOfPoint cuz when someone wants to edit its land he needs to in its boundaries.


Re: Help Please - AbyssMorgan - 02.11.2015

PHP код:
IsPlayerInDynamicArea(playerid, areaid, recheck = 0);

stock IsPointInArea(Float:x,Float:y,Float:z,Float:minx,Float:miny,Float:minz,Float:maxx,Float:maxy,Float:maxz){
    if((
x >= minx && x <= maxx) && (y >= miny && y <= maxy) && (z >= minz && z <= maxz)) return true;
    return 
false;
} 



Re: Help Please - Alpha000 - 03.11.2015

and what should i add in my command "IsPlayerInDynamicArea" OR "IsPointInArea"