SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 31/03/2015, 10:19 AM   #1
CalvinC
High-roller
 
CalvinC's Avatar
 
Join Date: Nov 2014
Location: Denmark
Posts: 1,831
Reputation: 114
Default Detecting a player accelerating

How can i detect if a player is accelerating?
I was thinking of detecting his keys to see if he's pressing W using GetPlayerKeys, but the wiki says you cannot do this anymore:
__________________
[Tutorial] Custom Playerdamage system
Desert Eagle's dealing too much damage, you want one-hit sniper kills, or damage based on body parts? Check this out.
CalvinC is offline   Reply With Quote
Old 31/03/2015, 10:22 AM   #2
Richie©
Banned
 
Join Date: Feb 2012
Location: Norway
Posts: 368
Reputation: 53
Default Re: Detecting a player accelerating

Have you tried: VEHICLE_ACCELERATE?
Richie© is offline   Reply With Quote
Old 31/03/2015, 10:24 AM   #3
CalvinC
High-roller
 
CalvinC's Avatar
 
Join Date: Nov 2014
Location: Denmark
Posts: 1,831
Reputation: 114
Default Re: Detecting a player accelerating

How can i use that?
__________________
[Tutorial] Custom Playerdamage system
Desert Eagle's dealing too much damage, you want one-hit sniper kills, or damage based on body parts? Check this out.
CalvinC is offline   Reply With Quote
Old 31/03/2015, 10:27 AM   #4
Richie©
Banned
 
Join Date: Feb 2012
Location: Norway
Posts: 368
Reputation: 53
Default Re: Detecting a player accelerating

Keystatechange callback and use vars is one way. I have done this method before.
Richie© is offline   Reply With Quote
Old 31/03/2015, 11:49 AM   #5
CalvinC
High-roller
 
CalvinC's Avatar
 
Join Date: Nov 2014
Location: Denmark
Posts: 1,831
Reputation: 114
Default Re: Detecting a player accelerating

The wiki says you can't detect directional keys, but found out i could still detect if the player is using KEY_SPRINT, by the directional keys it's not WASD, only the arrows.
But thanks.
__________________
[Tutorial] Custom Playerdamage system
Desert Eagle's dealing too much damage, you want one-hit sniper kills, or damage based on body parts? Check this out.
CalvinC 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
Detecting if player is not near checkpoint [HELP] fonia5 Scripting Help 13 11/01/2015 05:57 PM
Detecting a player tabbed Skribblez Scripting Help 6 29/08/2013 06:14 PM
Detecting if player is on a pickup Jstylezzz Scripting Help 5 11/07/2012 08:56 PM
Accelerating Objects Skiaffo Help Archive 4 01/10/2010 02:50 AM
Detecting if player in certain zone. DiddyBop Help Archive 2 14/12/2009 07:40 AM


All times are GMT. The time now is 10:01 PM.


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