Airbrake protection
#1

So, I had an idea for airbreak protection for if someone's in jail. Could someone point me in the direction on how to code this?

Here's how it works:

When someone is arrested (in cops and robbers), then they are sent to jail and a timer starts. I want it so that if the person is not in the range of the jail cell and the timer is still going, then they are automatically banned. I know how to do Ban();, but how would I check if they aren't in range but the timer is still going.

Thanks
Reply
#2

Just use an Anti-Cheat
Reply
#3

Quote:
Originally Posted by AndrewP
Could someone point me in the direction on how to code this?
Reply
#4

Set the timer to 1 second (1000) and have the repeat set to true, then inside the timer func you want to do
if (!isplayerinrangeofpoint(playerid, x, y, z, range))
{
Ban();
}

and be sure to use killtimer when the player leaves the cell/jail
one more note you will need to use settimerex for this aswell.

but in the end I recomend you finding an anti cheat because there are better (but more complex) ways to do it

Hope this puts you on your path xD

Happy scripting /phil
Reply
#5

Quote:
Originally Posted by philmckrakin
Set the timer to 1 second (1000) and have the repeat set to true, then inside the timer func you want to do
if (!isplayerinrangeofpoint(playerid, x, y, z, range))
{
Ban();
}

and be sure to use killtimer when the player leaves the cell/jail
one more note you will need to use settimerex for this aswell.

but in the end I recomend you finding an anti cheat because there are better (but more complex) ways to do it

Hope this puts you on your path xD

Happy scripting /phil
Thanks!
Reply
#6

Np xD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)