• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] Detect Holding Key
#1
Question 
is there any way?how can i check if a player is holding the KEY_SPRINT button?
  Reply
#2
https://open.mp/en/docs/scripting/callba...tateChange

Look for "Detecting holding a key"
  Reply
#3
is there any other way? because i'm not using OnPlayerKeyStateChange on holding key function
  Reply
#4
(2021-06-23, 11:47 AM)GeorgeXCarl Wrote: is there any other way? because i'm not using OnPlayerKeyStateChange on holding key function

https://open.mp/docs/scripting/functions/GetPlayerKeys
Using Pawn.CMD?

If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
  Reply
#5
(2021-06-23, 11:47 AM)GeorgeXCarl Wrote: is there any other way? because i'm not using OnPlayerKeyStateChange on holding key function



You could either use that or do GetPlayerKeys.

https://open.mp/docs/scripting/functions/GetPlayerKeys
Check out Desolation Roleplay, where zombie AI and scavenging is bothered by player bandits!


  Reply
#6
(2021-06-23, 09:57 PM)Awide Wrote:
(2021-06-23, 11:47 AM)GeorgeXCarl Wrote: is there any other way? because i'm not using OnPlayerKeyStateChange on holding key function



You could either use that or do GetPlayerKeys.

https://open.mp/docs/scripting/functions/GetPlayerKeys

And what's the point of writing the exact same thing I did? :)
Using Pawn.CMD?

If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
  Reply


Forum Jump: