{$CLEO .cs}
0AB0: key_pressed 88 // Click Start Script Key = X
THREAD 'TELEPORT'
:TELEPORT_11
WAIT 0
0972: put_actor $PLAYER_ACTOR at 597.2166 -1248.985 18.2856
WAIT 56500
0972: put_actor $PLAYER_ACTOR at 2239.727 -2258.781 14.7647
WAIT 500
JUMP @keyPress
WAIT 1200
0972: put_actor $PLAYER_ACTOR at 2201.598 -2199.129 13.5547
WAIT 500
jump @keyPress
WAIT 1200
0972: put_actor $PLAYER_ACTOR at 2129.484 -2276.748 14.7834
WAIT 500
JUMP @keyPress
WAIT 1200
JUMP @TELEPORT_11
: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 0x59 0 0@ // Click Key = Y
end
end
0AB2: ret 0
You must use call not jump for snippetsWhy is the SAMP crash?
Code:{$CLEO .cs} 0AB0: key_pressed 88 // Click Start Script Key = X THREAD 'TELEPORT' :TELEPORT_11 WAIT 0 0972: put_actor $PLAYER_ACTOR at 597.2166 -1248.985 18.2856 WAIT 56500 0972: put_actor $PLAYER_ACTOR at 2239.727 -2258.781 14.7647 WAIT 500 JUMP @keyPress WAIT 1200 0972: put_actor $PLAYER_ACTOR at 2201.598 -2199.129 13.5547 WAIT 500 jump @keyPress WAIT 1200 0972: put_actor $PLAYER_ACTOR at 2129.484 -2276.748 14.7834 WAIT 500 JUMP @keyPress WAIT 1200 JUMP @TELEPORT_11 :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 0x59 0 0@ // Click Key = Y end end 0AB2: ret 0
{$CLEO .cs}
THREAD 'TELEPORT'
repeat
wait 0
until 0AB0: key_pressed 88 // Click Start Script Key = X
:TELEPORT_11
WAIT 0
0972: put_actor $PLAYER_ACTOR at 597.2166 -1248.985 18.2856
WAIT 56500
0972: put_actor $PLAYER_ACTOR at 2239.727 -2258.781 14.7647
WAIT 500
0AB1: call @keyPress 2 key 0@ time 200 // <-- replace 0@ with your key you want to press ( virtual key code)
WAIT 1200
0972: put_actor $PLAYER_ACTOR at 2201.598 -2199.129 13.5547
WAIT 500
0AB1: call @keyPress 2 key 0@ time 200
WAIT 1200
0972: put_actor $PLAYER_ACTOR at 2129.484 -2276.748 14.7834
WAIT 500
0AB1: call @keyPress 2 key 0@ time 200
WAIT 1200
JUMP @TELEPORT_11
: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 0x59 0 0@ // Click Key = Y
end
end
0AB2: ret 0
{$CLEO .cs}
THREAD 'TELEPORT'
repeat
wait 0
until 0AB0: key_pressed 88 // Click Start Script Key = X
:TELEPORT_11
WAIT 0
0972: put_actor $PLAYER_ACTOR at 597.2166 -1248.985 18.2856
WAIT 56500
0972: put_actor $PLAYER_ACTOR at 2239.727 -2258.781 14.7647
WAIT 500
0AB1: call @keyPress 2 key 89 time 200 // <-- replace 0@ with your key you want to press ( virtual key code)
WAIT 1200
0972: put_actor $PLAYER_ACTOR at 2201.598 -2199.129 13.5547
WAIT 500
0AB1: call @keyPress 2 key 89 time 200
WAIT 1200
0972: put_actor $PLAYER_ACTOR at 2129.484 -2276.748 14.7834
WAIT 500
0AB1: call @keyPress 2 key 89 time 200
WAIT 1200
JUMP @TELEPORT_11
: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 89
wait 1@
0AA5: call 2@ num_params 4 pop 0 0 0x59 0 89 // Click Key = Y
end
end
0AB2: ret 0
{$CLEO}
0000:
repeat
wait 0
until SAMP.Available()
0@ = 0
while true
wait 0
if key_down 88
then
repeat
wait 0
until not key_down 88
0B12: 0@ = 0@ XOR 1
end
if 0@ == 1
then
WAIT 0
0972: put_actor $PLAYER_ACTOR at 597.2166 -1248.985 18.2856
WAIT 56500
0972: put_actor $PLAYER_ACTOR at 2239.727 -2258.781 14.7647
WAIT 500
0C72: set_virtual_key 89 down true
wait 1
0C72: set_virtual_key 89 down false
WAIT 1200
0972: put_actor $PLAYER_ACTOR at 2201.598 -2199.129 13.5547
WAIT 500
0C72: set_virtual_key 89 down true
wait 1
0C72: set_virtual_key 89 down false
WAIT 1200
0972: put_actor $PLAYER_ACTOR at 2129.484 -2276.748 14.7834
WAIT 500
0C72: set_virtual_key 89 down true
wait 1
0C72: set_virtual_key 89 down false
WAIT 1200
end
END
use samp r1 and sampfuncsThank you very much. Only there is one problem that crashes me with SAMP.
{$CLEO .cs}
thread 'TP'
repeat
wait 0
until 0AB0: key_pressed 88
:TP_11
wait 0
0972: put_actor $PLAYER_ACTOR at 597.2166 -1248.985 18.2856
wait 56500
0972: put_actor $PLAYER_ACTOR at 2239.727 -2258.781 14.7647
wait 1200
0972: put_actor $PLAYER_ACTOR at 2201.598 -2199.129 13.5547
wait 1200
0972: put_actor $PLAYER_ACTOR at 2129.484 -2276.748 14.7834
wait 1200
jump @TP_11
{$CLEO .cs}
0000: NOP
wait 10000
while true
wait 0
if
0ADC: test_cheat "Z"
then
0@ = true
else
if
0ADC: test_cheat "X"
then
0@ = false
end
end
if
0@ == true
then
wait 0
0972: put_actor $PLAYER_ACTOR at 597.2166 -1248.985 18.2856
wait 56500
0972: put_actor $PLAYER_ACTOR at 2239.727 -2258.781 14.7647
wait 1200
0972: put_actor $PLAYER_ACTOR at 2201.598 -2199.129 13.5547
wait 1200
0972: put_actor $PLAYER_ACTOR at 2129.484 -2276.748 14.7834
wait 1200
end
end
{$CLEO .cs}
0000: NOP
wait 10000
while true
wait 0
if
0ADC: test_cheat "Z"
then
if
0@ == false
then
0@ = true
else
0@ = false
end
end
if
0@ == true
then
wait 0
0972: put_actor $PLAYER_ACTOR at 597.2166 -1248.985 18.2856
wait 56500
0972: put_actor $PLAYER_ACTOR at 2239.727 -2258.781 14.7647
wait 1200
0972: put_actor $PLAYER_ACTOR at 2201.598 -2199.129 13.5547
wait 1200
0972: put_actor $PLAYER_ACTOR at 2129.484 -2276.748 14.7834
wait 1200
end
end
pls rainbow skin.cs