Zones.
#1

Hey guys i got another question xD.

I want to know 2 things!

1. Admin Zones.
How do i set admin only zones? So if a non admin comes in the zone it kills them and says "You have been killed for trespassing in an admin only area? My admin tag is IsPlayerAdmin so can someone show me to make non admins be killed when entering and admins not be killed?

2. Gang Zones.
How do i make gang zones on the map? Like, it shows black over certain areas, yellow over others, green, blah blah blah... ?
Reply
#2

Well you could start with creating the admin zone- There are many functions for this but I advise you to use:

pawn Код:
IsPlayerInRangeOfPoint(playerid, Float:Radius, Float:x, Float:y, Float:z);
Then you'd create a timer to check whether the player is the radius of x, y, z and if their admin level is lower than 1 - SetPlayerHealth(playerid, 0.0);

And for your second question, you can use:

pawn Код:
new gangzone1;
gangzone1 = GangZoneCreate(Float:minx, Float:miny, Float:maxx, Float:maxy);
And then OnPlayerConnect or OnPlayerSpawn:

pawn Код:
GangZoneShowForPlayer(playerid, gangzone1, color);
or

pawn Код:
GangZoneShowForAll(gangzone1, color);
Reply
#3

How would i set that up? Im not good at pwn so.....?
Reply
#4

Do you have the X,Y,Z co-ordinates of your admin zone?
Reply
#5

Yh.

X = 1701.9475
Y = 940.5465
Z = 10.8203

Its the lva freight depot.
Reply
#6

for like minX and miny and maxX and maxY can i put like bottom left corner and top left as those or what?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)