Gang zone help
#1

How can i detect if a player is in a gangzone, and if they are a command could work.



So, I want it so if a player is in a certain gangzone and i type /moveplayer 5 it moves id 5 out of the gangzone and teleports outside the gangzone.


I know how to do the whole teleport command and everything, but how can i detect if a player is in a gangzone in the first place?



EDIT: So what i need is, IsPlayerInArea to work with this gang zone: gangzone = GangZoneCreate(1830.3060, -2460.9521, 1883.3285, -2406.4404);

So if someone enters it displays a message like "Noob"
Reply
#2

i love'd to see if that exist, im also working on it now
Reply
#3

It does exist because i was on a server, and when a player entered a gang zone it would send them a message.


Maybe they use isplayerinarea?



How do I use IsPlayerInArea? Like, This is my gang zone:

pawn Code:
gangzone = GangZoneCreate(1830.3060, -2460.9521, 1883.3285, -2406.4404);


So for IsPlayerInArea do i use the same cords? Like This:

pawn Code:
public CheckAdminArea()
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(!IsPlayerConnected(i)) continue;
        if(IsPlayerInArea(i,(1830.3060, -2460.9521, 1883.3285, -2406.4404) && !IsPlayerAdmin(i))
        {
            //Do your stuff
                        SetPlayerHealth(i,0); // Kills him, for example.
        }
    }
    return 1;
}

If so, I tried tat, and it didn't work when i was in the gang zone....
Reply
#4

Reply
#5

Can you help me lolrofl
Reply
#6

Ok, Here is my gang zone. It works perfect. Goes right over the spot i need it to over.

pawn Code:
gangzone = GangZoneCreate(1830.3060, -2460.9521, 1883.3285, -2406.4404);
This is my IsPlayerInArea. It's the same cords as my gang zone except i put it in the format max x and min x and max y and min y.

Can someone please help

pawn Code:
forward CheckLSVSArea();

SetTimer("CheckLSVSArea",3000,1);

public CheckLSVSArea()
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(!IsPlayerConnected(i)) continue;
        if(IsPlayerInArea(i,1883.3285,1830.3060,-2406.4404,-2460.9521))
        {

        SendClientMessage(i,0x1E90FFAA, "NOOB");
        }
    }
    return 1;
}
Reply
#7

I'd like to know the same thing plz
Reply
#8

Bump please help
Reply
#9

Ill help, but tomorrow when i get my lappy
Reply
#10

Ok, thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)