[HELP] Airbreak Jail escape
#1

Hey Guys I Just need some help with some scripting. i want it to kick/ban it doesnt matter which one if the player uses airbreak inside the jail cell and tries to escape. so if a player tries to escape being in jail by using airbreak he will be Kicked/Banned! THANX
Reply
#2

if player is jailed, check if he is still inside the jailcell by using IsPlayerInRangeOfPoint. If he is not, then kick.
Reply
#3

Ok Ill Try That THNX!!
Reply
#4

another idea I'm using, get for example Jail VirtualWorld is 3
pawn Код:
// What ever you use to put player in jail
//example:
if(InJail[playerid] == 1)
{
   if(GetPlayerVirtualWorld(playerid) != 3)
   {
      Kick(playerid);
   }
}
so the idea revolves around Virtual world
Reply
#5

Yh But the Player cant change his virtual world or interioir if he uses airbreak or anything else to get out! Thanx any way.
Reply
#6

What I would suggest would be to use Incognito's streamer, believe it or not. First of all, create a dynamic area using CreateDynamicRectangle, then use OnPlayerLeaveDynamicArea. Meaning, that when a player exits the cell area, and they are NOT jailed, then you can kick/ban the player.

pawn Код:
public OnPlayerLeaveDynamicArea(playerid, areaid)
{
    if(areaid == mycellarea) //mycellarea is not defined, and must be defined using CreateDynamicRectangle
    {
        if(IsPlayerInJail[playerid]) //Also not defined, replace this with your variable that defines whether a player is jailed or not
        {
            Kick(playerid); //Or Ban(playerid); etc.
        }
    }
    return 1;
}
This is just an example and won't function properly if you paste it into your script.
Reply
#7

Quote:
Originally Posted by chubz
Посмотреть сообщение
Hey Guys I Just need some help with some scripting. i want it to kick/ban it doesnt matter which one if the player uses airbreak inside the jail cell and tries to escape. so if a player tries to escape being in jail by using airbreak he will be Kicked/Banned! THANX
Why annoy yourself ?
pawn Код:
public OnPlayerUpdate(playerid)
{
    if(GetPVarInt(playerid, "pJail") == 1) // you need to set the variable when the player get jailed.
    {
        TogglePlayerControllable(playerid,1);
    }
    return 1;
}
now simply he can move freely but can't aim/shoot or drive a car i guess.
Reply
#8

Thanx Guys Dont worry about it any more i Got It i Used if(!IsPlayerInRangeOfPoint --

Код:
if(PlayerInfo[playerid][Jailed] == 1)
	{
		if(!IsPlayerInRangeOfPoint(playerid, 2.7, 264.6288,77.5742,1001.0391))
		{
	    	    format(string, sizeof string, "  %s has kicked for Using Using AirBreak in Jail!", sendername);
		    SendClientMessageToAll(COLOR_RED, string);
		    Kick(playerid);
		}
	}
Reply
#9

It might not be "airbreak" though and they just teleport a player or a place. A reason "for using cheats" would be better!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)