SA-MP Forums

Go Back   SA-MP Forums > SA-MP > General

Reply
 
Thread Tools Display Modes
Old 10/12/2010, 10:35 AM   #1
Juanxz
Big Clucker
 
Join Date: Jan 2010
Posts: 124
Reputation: 1
Default I need your help. [Anti-Mountain Bike]

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.
Juanxz is offline   Reply With Quote
Old 10/12/2010, 11:10 AM   #2
SaW
High-roller
 
SaW's Avatar
 
Join Date: Nov 2007
Location: JernejL's backyard.
Posts: 1,462
Reputation: 46
Default Re: I need your help. [Anti-Mountain Bike]

Are you talking about a roleplay server?
Just make a rule for it and jail people doing it.
__________________
What the human race is suffering from is mass hypnosis.
SaW is offline   Reply With Quote
Old 10/12/2010, 01:27 PM   #3
DRIFT_HUNTER
High-roller
 
DRIFT_HUNTER's Avatar
 
Join Date: Oct 2009
Posts: 1,413
Reputation: 64
Default Re: I need your help. [Anti-Mountain Bike]

disable jump button?
DRIFT_HUNTER is offline   Reply With Quote
Old 10/12/2010, 01:46 PM   #4
Karlip
High-roller
 
Join Date: Oct 2007
Location: Click To Show
Posts: 1,883
Reputation: 100
Default Re: I need your help. [Anti-Mountain Bike]

Quote:
Originally Posted by DRIFT_HUNTER View Post
disable jump button?
..wat.

Anyway, get rid of the bikes, they seem to be causing a lot of trouble there.
__________________
Karlip is offline   Reply With Quote
Old 10/12/2010, 03:31 PM   #5
Juanxz
Big Clucker
 
Join Date: Jan 2010
Posts: 124
Reputation: 1
Default Re: I need your help. [Anti-Mountain Bike]

Quote:
Originally Posted by DRIFT_HUNTER View Post
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.

Last edited by Juanxz; 10/12/2010 at 03:41 PM.
Juanxz is offline   Reply With Quote
Old 11/12/2010, 05:17 AM   #6
RealCop228
Godfather
 
Join Date: Feb 2010
Location: Springboro, OH
Posts: 8,265
Reputation: 670
Default Re: I need your help. [Anti-Mountain Bike]

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"...
__________________
Putting [URGENT] in the thread title stops me from opening the thread. Nobody else's problem on this forum is more important that another person's. Try not to be self-centered!
RealCop228 is offline   Reply With Quote
Old 11/12/2010, 07:08 AM   #7
case 1337:
Big Clucker
 
case 1337:'s Avatar
 
Join Date: Dec 2010
Posts: 62
Reputation: 0
Default Re: I need your help. [Anti-Mountain Bike]

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 Code:
#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;
}
case 1337: is offline   Reply With Quote
Old 11/12/2010, 07:43 AM   #8
[DJ]Boki
Huge Clucker
 
[DJ]Boki's Avatar
 
Join Date: Jun 2010
Posts: 239
Reputation: 0
Default Re: I need your help. [Anti-Mountain Bike]

disable max speed dude....because when they clkicking ww,they go faster,disable that
[DJ]Boki is offline   Reply With Quote
Old 12/12/2010, 12:13 PM   #9
Juanxz
Big Clucker
 
Join Date: Jan 2010
Posts: 124
Reputation: 1
Default Re: I need your help. [Anti-Mountain Bike]

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

Case1337, may I use your script?
Juanxz is offline   Reply With Quote
Old 12/12/2010, 01:00 PM   #10
Sergei
High-roller
 
Sergei's Avatar
 
Join Date: Mar 2008
Location: Slovenia
Posts: 2,703
Reputation: 130
Default Re: I need your help. [Anti-Mountain Bike]

You should use something like this.
pawn Code:
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;
}
Sergei is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] [FS] Anti fall off bike v2.5 Zezombia Filterscripts 68 12/03/2013 02:21 PM
anti fall from bike FireCat Help Archive 0 23/08/2010 11:03 AM
[FilterScript] [FS]Anti Fall of Bike MatrixBoY Filterscripts 14 27/08/2009 11:05 PM
mountain bike Stunts by [SP]JTweemanXD [SP]JTweemanXD Screenshots and Videos 3 14/03/2009 01:40 AM


All times are GMT. The time now is 12:05 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.