SA-MP Forums Archive
[HELP]When you enter a gangzone how do i suppose to make a message pop up ? - 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]When you enter a gangzone how do i suppose to make a message pop up ? (/showthread.php?tid=593960)



[HELP]When you enter a gangzone how do i suppose to make a message pop up ? - JBee - 12.11.2015

The title says it all!


Re: [HELP]When you enter a gangzone how do i suppose to make a message pop up ? - Karan007 - 12.11.2015

PHP код:
IsPlayerInArea(playerid, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY)
{
    new 
Float:X, Float:Y, Float:Z;

    
GetPlayerPos(playerid, X, Y, Z);
    if(
X >= MinX && X <= MaxX && Y >= MinY && Y <= MaxY) {
        return 
1;
    }
    return 
0;
} 
I don't know who the credits goes to. And if you want a message to pop-up use this funtion at OnPlayerUpdate. Example: if(IsPlayerInArea(player, /*positions*/))