How can i sendmessage when they leave a area?
#1

Hello, i was thinking of like when a player Enters/Exits a area for eg. boundry of Los Angeles the auto get Message You have left the city of Los Angels or like when they enter LV it says You are now entering city of Las Vages?

Can you tell me how to?

Thanks in advance!
Reply
#2

first you can use
pawn Code:
public OnGameModeInit()
{
    EnableZoneNames(1);
    return 1;
}
Secondly you can do
pawn Code:
stock IsPlayerInArea(playerid, Float:max_x, Float:min_x, Float:max_y, Float:min_y)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
if(X <= max_x && X >= min_x && Y <= max_y && Y >= min_y) return 1;
return 0;
}
All you need is to set coordinates to one you wish

and at end just check if players is in zone it will send GameTextForPlayer or textdraw or smth to player with message you wish.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)