SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 06/04/2012, 12:39 PM   #1
Dripac
Banned
 
Join Date: Apr 2009
Posts: 1,620
Reputation: 194
Default [BUG] Bike

There is a bug with the bikes, if they are for a faction/team and a player enters it, he can drive with it, here an example video, it's at the beginning driving a NRG

Dripac is offline   Reply With Quote
Old 06/04/2012, 12:43 PM   #2
CaHbKo
Huge Clucker
 
Join Date: Nov 2007
Posts: 460
Reputation: 44
Default Re: [BUG] Bike

It is a script problem. Report it on the server's website.

Or if you're the scripter, use something other than RemovePlayerFromVehicle, because it simulates pressing F key (try getting full speed on NRG and press F, see how it drops speed first?)

The thing that you're able to drive on bikes after said function been used is because the speed is too high for default getting off animation, and too low for jumping off animation, so when either condition is satisfied, you're forced off the bike.
CaHbKo is offline   Reply With Quote
Old 06/04/2012, 12:46 PM   #3
Dripac
Banned
 
Join Date: Apr 2009
Posts: 1,620
Reputation: 194
Default Re: [BUG] Bike

Quote:
Originally Posted by CaHbKo View Post
It is a script problem. Report it on the server's website.
No, it's a samp bug.

Because i also used to do this on a lot of servers

It's funny because if it's a car this bug doesn't happen, it has something to do with bikes
Dripac is offline   Reply With Quote
Old 06/04/2012, 12:49 PM   #4
CaHbKo
Huge Clucker
 
Join Date: Nov 2007
Posts: 460
Reputation: 44
Default Re: [BUG] Bike

Quote:
Originally Posted by CaHbKo View Post
The thing that you're able to drive on bikes after said function been used is because the speed is too high for default getting off animation, and too low for jumping off animation, so when either condition is satisfied, you're forced off the bike.
asdf
CaHbKo is offline   Reply With Quote
Old 06/04/2012, 12:53 PM   #5
StreetGT
Gangsta
 
StreetGT's Avatar
 
Join Date: Dec 2008
Location: Portugal - Porto - Baiao
Posts: 967
Reputation: 65
Default Re: [BUG] Bike

way to fix.

pawn Code:
stock RemovePlayerFromVehicleEx(playerid)
{
    TogglePlayerControllable(playerid, 0);
    RemovePlayerFromVehicle(playerid);
    SetTimerEx("VehUnfreeze", 1000, 0, "i", playerid);
}

forward VehUnfreeze(playerid);
public VehUnfreeze(playerid)
{
    TogglePlayerControllable(playerid, 1);
}
__________________
StreetGT is offline   Reply With Quote
Old 06/04/2012, 12:55 PM   #6
Y_Less
Beta Tester
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629
Posts: 13,301
Reputation: 1909
Default Re: [BUG] Bike

That fact that you said "faction" in your first post basically PROVES that it is a script bug, not a SA:MP bug. SA:MP has no concept of factions or owned vehicles - as far as it is concerned you can drive vehicles and any restrictions on this fact are introduced by the script. If a restriction does not work in some cases then the script implementing those restrictions needs improving.
__________________
Y_Less is offline   Reply With Quote
Old 06/04/2012, 02:55 PM   #7
MP2
Godfather
 
MP2's Avatar
 
Join Date: Jan 2011
Location: England
Posts: 5,264
Reputation: 748
Default Re: [BUG] Bike

It's not that which causes the problem, it's RemovePlayerFromVehicle - it doesn't work if you're going too fast/slow, as described by CaHbKo.

You should try and use SetPlayerPos instead.
__________________
>> Click here for ALL of my releases
mGates - Create AUTOMATIC gates with ONE FUNCTION (+ restrictions i.e. team members only)
IEE (Interior Enter/Exits) - Create enex markers with one function
Cuffs - Cuff offsets for ALL SKINS!
vfunc - Vehicle functions. GetVehicleColor and synced random colors.
gBug - Prevent the 'G' bug (players being able to enter moving vehicles by pressing G then running after them).
MP2 is offline   Reply With Quote
Old 06/04/2012, 05:56 PM   #8
StreetGT
Gangsta
 
StreetGT's Avatar
 
Join Date: Dec 2008
Location: Portugal - Porto - Baiao
Posts: 967
Reputation: 65
Default Re: [BUG] Bike

Quote:
Originally Posted by StreetGT View Post
way to fix.

pawn Code:
stock RemovePlayerFromVehicleEx(playerid)
{
    TogglePlayerControllable(playerid, 0);
    RemovePlayerFromVehicle(playerid);
    SetTimerEx("VehUnfreeze", 1000, 0, "i", playerid);
}

forward VehUnfreeze(playerid);
public VehUnfreeze(playerid)
{
    TogglePlayerControllable(playerid, 1);
}
this work also for fix the bug.
__________________
StreetGT is offline   Reply With Quote
Old 07/04/2012, 10:36 AM   #9
Y_Less
Beta Tester
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629
Posts: 13,301
Reputation: 1909
Default Re: [BUG] Bike

Quote:
Originally Posted by StreetGT View Post
this work also for fix the bug.
firstly, you're quoting yourself. Secondly, we've already said it's not a bug so there's no need to fix anything... If this sort of removal is not what you want, don't use this function.
__________________
Y_Less 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
My new bike rafay Everything and Nothing 34 01/11/2009 06:48 PM
car/bike fix? Eazy_E214 Help Archive 4 18/08/2009 01:32 PM
[FilterScript] [FS] Bike Fly (hax) LethaL Filterscripts 10 16/04/2009 08:28 PM


All times are GMT. The time now is 08:11 AM.


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