I need your help. [Anti-Mountain Bike]
#1

So...on my server, my friends like to use mountain bike as their getaway vehicle while they are wanted by the cops. It's impossible to catch them unless they fall off or find themselves in a tight spot. I find it annoying that I have to take a lot of time to catch them.

What would you recommend as an anti-mountain bike system? I want to be able to stop them or at least make them fall off. I tried using the quarry truck but they just passed by it. Do you know of an ambush area against the mountain bikes? An area with high walls, one exit which can be easily blocked. Thanks.
Reply
#2

Are you talking about a roleplay server?
Just make a rule for it and jail people doing it.
Reply
#3

disable jump button?
Reply
#4

Quote:
Originally Posted by DRIFT_HUNTER
Посмотреть сообщение
disable jump button?
..wat.

Anyway, get rid of the bikes, they seem to be causing a lot of trouble there.
Reply
#5

Quote:
Originally Posted by DRIFT_HUNTER
Посмотреть сообщение
disable jump button?
Yea! That's a really good idea. Thanks.


Edit: The jump button is the secondary fire. I have hunters in the server. I don't want to disable their secondary fire.
Reply
#6

You could simply make a public/stock function such as "IsMountainBike(model)" so when a players state changes to "PLAYER_STATE_DRIVER" you could see if they are on a mountain bike - if they are, just "RemovePlayerFromVehicle"...
Reply
#7

Why remove the Mountain Bike? Just disable jumping, it's unrealistic and gives an unfair advantage to other players.

I tried to implement an anti-mountain bike jumping system. Here, I did some compiling here and there, and figured it out.

This SHOULD work completely, can't test right now, I'm somewhere where I'm restricted to download anything, even PAWN.

pawn Код:
#include <a_samp>

new DelayTimer;

forward DelayFreeze(playerid);

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY_FIRE)
    {
        if(GetVehicleModel(GetPlayerVehicleID(playerid) == 510))
        {
            if(GetPlayerState(playerid == PLAYER_STATE_DRIVER))
            {
                new Float:z_rot;
                GetVehicleZAngle(GetPlayerVehicleID(playerid), z_rot);
                SetVehicleZAngle(GetPlayerVehicleID(playerid), z_rot-4);
                DelayTimer = SetTimer("DelayFreeze", 2000, false);
                TogglePlayerControllable(playerid, 0);
                return true;
            }
            else if(!GetVehicleModel(GetPlayerVehicleID(playerid) == 510))
            {
                SendClientMessage(playerid, 0xFFFFFFAA, "You are not in a Mountain Bike.");
                return true;
            }
            else if(!GetPlayerState(playerid == PLAYER_STATE_DRIVER))
            {
                SendClientMessage(playerid, 0xFFFFFFAA, "You are not the driver.");
                return true;
            }
        }
    }
    return true;
}

public DelayFreeze(playerid)
{
    KillTimer(DelayTimer);
    TogglePlayerControllable(playerid, 1);
    return true;
}
Reply
#8

disable max speed dude....because when they clkicking ww,they go faster,disable that
Reply
#9

I don't want to remove any bikes. Just disabling the bunny hop.

Case1337, may I use your script?
Reply
#10

You should use something like this.
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_FIRE)
    {
        new vid = GetPlayerVehicleID(playerid);
        if(GetVehicleModel(vid) == 510)
        {
            SetVehicleVelocity(vid,0.0,0.0,0.0);
                SendClientMessage(playerid,0xFFFFFFFF,"Jumping is not allowed!");
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)