Question Jimmy_Hopkins's question

Status
Not open for further replies.

JIMMY*

Good Fella
Joined
Sep 25, 2015
Messages
275
Reaction score
98
Question

In-Character Name:
Jimmy_Hopkins​

Service:
SA:MP​

Question:
this is the script script :
insert::
Loop,
{
Send, {pause Down}
Sleep 4
Send, {pause Up}
Sleep,4
Send, {pause Down}
Sleep 4
Send, {pause Up}
Sleep,4
Send, {pause Down}
Sleep 4
Send, {pause Up}
Sleep,4
GetKeyState, state, Del
if state = D
break
}
Return

20% of time if sprint binds are on and if I jack someone's car then I automatically ninja jack the pussy driver. Turning off binds and then jacking the car is something that i have to do b4 stealing someone's car. Now its not possible for me to turn it off and jack the car every time as I am a human not a bot like C.O.C.K , remembering it every time is quite hard so I decided to fix the script by taking your help. every help would be appreciated.​
 

Whinestein

Banned
Joined
Feb 2, 2014
Messages
470
Reaction score
170
Xbutton2::
Loop
{
if not GetKeyState("XButton2", "P")

break
Sleep 5
Send {space down}
Sleep 5
Send {space up}
}
return

this is my sprint bind and it works fine lol
 

JIMMY*

Good Fella
Joined
Sep 25, 2015
Messages
275
Reaction score
98
Xbutton2::
Loop
{
if not GetKeyState("XButton2", "P")

break
Sleep 5
Send {space down}
Sleep 5
Send {space up}
}
return

this is my sprint bind and it works fine lol
me nub me dont know how to active script me gud me poor me paki
 
Last edited:
Joined
Sep 25, 2014
Messages
4,803
Reaction score
962
Xbutton is a button in gaming mouses. If you don't have a gaming mouse, you will have to change the bind key.
This is my sprint bind. I have no problem in jacking people's cars and not ninja-jack them.

Code:
$CAPSLOCK::
Loop
{
    if not GetKeyState("CAPSLOCK", "P")
    break

    Sleep 20
    Send {space down}
    Sleep 20
    Send {space up}
}
Return = 1
Return
;_
 

Jazzy

Old School 2013
Joined
Apr 27, 2013
Messages
4,888
Reaction score
1,223

Helper Team - Lawless Roleplay

What's your sprint button? Left shift, capslock, DEL?


Here's left shift:

Code:
LShift::
Loop
{
if not GetKeyState("LShift", "P")
break

Sleep 5
Send {Space down}
Sleep 5
Send {Space up}
}

return
Here's capslock:

Code:
$CAPSLOCK::

Loop
{
if not GetKeyState("CAPSLOCK", "P")
Return

Sleep 10
Send {space down}
Sleep 10
Send {space up}
}
Return
@JIMMY*
 

JIMMY*

Good Fella
Joined
Sep 25, 2015
Messages
275
Reaction score
98

Helper Team - Lawless Roleplay

What's your sprint button? Left shift, capslock, DEL?


Here's left shift:

Code:
LShift::
Loop
{
if not GetKeyState("LShift", "P")
break

Sleep 5
Send {Space down}
Sleep 5
Send {Space up}
}

return
Here's capslock:

Code:
$CAPSLOCK::

Loop
{
if not GetKeyState("CAPSLOCK", "P")
Return

Sleep 10
Send {space down}
Sleep 10
Send {space up}
}
Return
@JIMMY*
once I press ' insert button ' the character sprints automatically after holding ' w '. and i want a script similar to this in which i can sprint without holding any other button except ' w '
 
Joined
Sep 25, 2014
Messages
4,803
Reaction score
962
Double tap W and hold it to sprint.
Code:
~w::
While (GetKeyState("w","p"))
{
}
keywait, w
If (dbg) 
  tooltip,%A_LineNumber% Got a w,300,0,1
If (A_TimeSincePriorHotkey = -1)
  return
if (A_TimeSincePriorHotkey > 1000)
  return
{ if (dbg)
    Tooltip,%A_LineNumber% Starting Loop w to quit, 300, 30, 2
  Loop
 {
Send, {Space Down}
Sleep 1
Send, {Space Up}
Sleep 1
Send, {Space Down}
Sleep 1
Send, {Space Up}
Sleep 1
Send, {Space Down}
Sleep 1
Send, {Space Up}
Sleep 1
GetKeyState, state, W
if state = U
break
 }
}
if (dbg)
  Tooltip,%A_LineNumber% Loop Broken, 300,30, 2
Return
 

JIMMY*

Good Fella
Joined
Sep 25, 2015
Messages
275
Reaction score
98
Double tap W and hold it to sprint.
Code:
~w::
While (GetKeyState("w","p"))
{
}
keywait, w
If (dbg)
  tooltip,%A_LineNumber% Got a w,300,0,1
If (A_TimeSincePriorHotkey = -1)
  return
if (A_TimeSincePriorHotkey > 1000)
  return
{ if (dbg)
    Tooltip,%A_LineNumber% Starting Loop w to quit, 300, 30, 2
  Loop
{
Send, {Space Down}
Sleep 1
Send, {Space Up}
Sleep 1
Send, {Space Down}
Sleep 1
Send, {Space Up}
Sleep 1
Send, {Space Down}
Sleep 1
Send, {Space Up}
Sleep 1
GetKeyState, state, W
if state = U
break
}
}
if (dbg)
  Tooltip,%A_LineNumber% Loop Broken, 300,30, 2
Return
its pretty cool but the problem i m getting is that after firing i have to again press w thrice to sprint. its like : pressing w 3x - shooting - pressing w 3x - shooting , i will die till i will repeat this lol. can u make it like the character sprints whenever i hold w?
after you make a script in which i can sprint by holding w , my problem will be solved . ty in advance:wacky:
 
Joined
Sep 25, 2014
Messages
4,803
Reaction score
962
Try this then. This will make you sprint whenever you press (and hold) W. You may have problem typing w though.

Code:
$W::
Loop
{
if not GetKeyState("CAPSLOCK", "P")
break

Sleep 20
Send {space down}
Sleep 20
Send {space up}
}
Return = 1
Return
;_
 
Status
Not open for further replies.