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
High-roller
 
Dripac's Avatar
 
Join Date: Apr 2009
Location: Austria
Posts: 1,700
Reputation: 236
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: 471
Reputation: 41
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
High-roller
 
Dripac's Avatar
 
Join Date: Apr 2009
Location: Austria
Posts: 1,700
Reputation: 236
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: 471
Reputation: 41
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
High-roller
 
StreetGT's Avatar
 
Join Date: Dec 2008
Location: Portugal
Posts: 1,266
Reputation: 88
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 - git.io/Y
Posts: 18,046
Reputation: 2507
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: 6,325
Reputation: 896
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 to see my releases.

Please do not PM me requesting help. Here you have a forum with 11,000+ active users - why are you limiting your help to one person?
MP2 is offline   Reply With Quote
Old 06/04/2012, 05:56 PM   #8
StreetGT
High-roller
 
StreetGT's Avatar
 
Join Date: Dec 2008
Location: Portugal
Posts: 1,266
Reputation: 88
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 - git.io/Y
Posts: 18,046
Reputation: 2507
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 07: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 10:10 AM.


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