Gang Zones
#1

Just wanted to know, how do i send a text to a player that enters a gang zone i made? something like "you entered on a restricted area" etcc or anything like that well, how?

Lets suppose that is my gang zone.

PHP код:
airport GangZoneCreate(1276.906, -2684.5882155.362, -2167.434); 
how do i detect that a player entered the gang zone ?
Reply
#2

Do you want to know how they entered or do you want them to receive a message for example once you have reached the range given on the coordinate it automatically sends you a message?
Reply
#3

yeah, once you'll enter the gang zone and reached the range given
Reply
#4

PHP код:
airport GangZoneCreate(1276.906, -2684.5882155.362, -2167.434) return SendClientMessage(playeridCOLOR_RED"You have entered a restricted area");  
return 
1
Try something like that
Reply
#5

Really that easy lol, yeah i'll try.

EDIT: Since i've made it on ongamemodeinit, the "playerid" is not defined there.
Reply
#6

Quote:
Originally Posted by Eric_White
Посмотреть сообщение
PHP код:
airport GangZoneCreate(1276.906, -2684.5882155.362, -2167.434) return SendClientMessage(playeridCOLOR_RED"You have entered a restricted area");  
return 
1
Try something like that
Are you drunk?


Here is what you need, including the functions to check if the player is on a specific turf.

https://sampforum.blast.hk/showthread.php?tid=276352

So doing something like

Код:
 
if ( IsPlayerInZone( playerid, airoport ) )
    return SendClientMessage( playerid, -1, "Please leave!" );
You'd have to have a 1 second timer where you deal with this kind of checks on your server, and from there it will be easy adding this one.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)