Call key press function

Status
Not open for further replies.

underWHAT

Active member
Joined
Mar 26, 2015
Messages
30
Reaction score
0
Hi guys. How i can to force player jump? Without key send. Maybe u know some functions?
 

Metmonk

New member
Joined
Jun 13, 2014
Messages
1
Reaction score
0
:keyPress
// 0@ - key, 1@ - time
// Example: 0AB1: call @keyPress 2 key 0@ time 1@

if 0AA2: 2@ = load_library "User32.dll"
then
    if 0AA4: 2@ = get_proc_address "keybd_event" library 2@
    then
        0AA5: call 2@ num_params 4 pop 0 0 0 0 0@
        wait 1@
        0AA5: call 2@ num_params 4 pop 0 0 0x02 0 0@
    end
end
0AB2: ret 0

dont know if this needs sampfuncs
 
Status
Not open for further replies.
Top