SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 30/12/2019, 01:54 PM   #1
JaKe Elite
High-roller
 
JaKe Elite's Avatar
 
Join Date: Apr 2012
Location: Philippines
Posts: 3,687
Reputation: 486
Default Surfing on unoccupied vehicle?

Is there any possible way to make GetPlayerSurfingVehicleID work with unoccupied vehicles? I think it doesn't work on unoccupied vehicles as it return 6335 (INVALID_VEHICLE_ID) when I tried debugging it on my test server.
JaKe Elite is offline   Reply With Quote
Old 30/12/2019, 10:53 PM   #2
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,190
Reputation: 406
Default Re: Surfing on unoccupied vehicle?

Quote:
Originally Posted by JaKe Elite View Post
Is there any possible way to make GetPlayerSurfingVehicleID work with unoccupied vehicles? I think it doesn't work on unoccupied vehicles as it return 6335 (INVALID_VEHICLE_ID) when I tried debugging it on my test server.
Create ur own GetPlayerSurfingVehicleID using some sort of GetClosestVehicle and check player range from the closest vehicle
__________________
Quote:
Originally Posted by Andy
My anti cheat is still relevant *puts shades on* https://github.com/RogueDrifter/Anti_cheat_pack

[Github]:Link [Gists]:Link [Forum]:Link [Server]:Link [Discord]:Link

RogueDrifter is offline   Reply With Quote
Old 31/12/2019, 08:17 AM   #3
Beckett
High-roller
 
Beckett's Avatar
 
Join Date: Feb 2012
Location: www.finalnights-rp.com
Posts: 1,773
Reputation: 104
Default Re: Surfing on unoccupied vehicle?

It returns the ID of the vehicle that the player is surfing. If they are not surfing a vehicle or the vehicle they are surfing has no driver, INVALID_VEHICLE_ID. If the player specified is not connected, INVALID_VEHICLE_ID also. You'll need to make your own function for what you need.
Beckett 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] Unoccupied Vehicle Damage[NEW] R0 Filterscripts 18 12/04/2015 08:34 PM
Unoccupied Vehicle Damage PSYCHOBABYKILLA Scripting Help 0 08/04/2015 10:21 AM
Unoccupied vehicle damage TheSimpleGuy Scripting Help 2 21/06/2014 11:34 AM
[FilterScript] Vehicle Killer (Unoccupied vehicle damage) KoczkaHUN Filterscripts 28 27/10/2013 04:38 PM
Unoccupied vehicle sync, boat surfing pausing issue, parachute with vehicle issue, surfing w/ skydiving issue Kar Bug Reports 2 10/06/2013 10:24 AM


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


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