how to connect 2 threads with local variable?

Статус
В этой теме нельзя размещать новые ответы.

noob213

Известный
Автор темы
33
2
example:

CLEO:
{$CLEO .cs}
0000: NOP
0C6A: 0@ = create_custom_thread_at_label @Noname_28 
0C6A: 1@ = create_custom_thread_at_label @Noname_94 
0BDE: pause_thread 0

:Noname_28
0001: wait 0 ms
00D6: if
0AB0:   key_pressed 49
then
wait 100
chatmsg "true" -1
0006: 15@ = 1
end
0002: jump @Noname_61

:Noname_61
0001: wait 0 ms
00D6: if
0AB0:   key_pressed 48
then
wait 100
chatmsg "false" -1
0006: 15@ = 0
end
0002: jump @Noname_28

:Noname_94
0001: wait 0 ms
00D6: if
0039:   15@ == 1 // check if it's true
then
wait 100
0AF8: samp add_message_to_chat "1" color -1 
end
0002: jump @Noname_94
 

BlackKnigga

Известный
BH Team
922
443
example:

CLEO:
{$CLEO .cs}
0000: NOP
0C6A: 0@ = create_custom_thread_at_label @Noname_28
0C6A: 1@ = create_custom_thread_at_label @Noname_94
0BDE: pause_thread 0

:Noname_28
0001: wait 0 ms
00D6: if
0AB0:   key_pressed 49
then
wait 100
chatmsg "true" -1
0006: 15@ = 1
end
0002: jump @Noname_61

:Noname_61
0001: wait 0 ms
00D6: if
0AB0:   key_pressed 48
then
wait 100
chatmsg "false" -1
0006: 15@ = 0
end
0002: jump @Noname_28

:Noname_94
0001: wait 0 ms
00D6: if
0039:   15@ == 1 // check if it's true
then
wait 100
0AF8: samp add_message_to_chat "1" color -1
end
0002: jump @Noname_94
Try sampfuncs global variable
 

noob213

Известный
Автор темы
33
2
I want to connect 2 threads but with local variables is it possible? and how would i
 
Статус
В этой теме нельзя размещать новые ответы.