for 0@ = 0 to 999
if 0B23: samp is_player_connected 0@
then
if 0B20: samp 1@@ = actor_handle_by_samp_player_id 0@
then 31@++
end
end
end
0AD1: "%d streamed players" 1000 31@
{$CLEO .cs}
0000: NOP
:Main
wait 0
if
0AB0: key_pressed 49
jf @Main
0A8D: 29@ = read_memory 0xB74490 size 4 virtual_protect 0
000A: 29@ += 0x4
0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
for 30@ = 0 to 35584 step 0x100
0A8D: 31@ = read_memory 29@ size 1 virtual_protect 0
000A: 29@ += 0x1
if and
0029: 31@ >= 0x00
001B: 0x80 > 31@
then
005A: 31@ += 30@
// GOT THE PED.
for 0@ = 0 to 999
if 0B23: samp is_player_connected 0@
then
if 0B20: samp 1@ = actor_handle_by_samp_player_id 0@
then 31@++
end
end
end
0AD1: "%d streamed players" 1000 31@
end
end
// FOR ALL PEDS END
jump @Main
monday link said:I tried to use the code below but it shows few thousands streamed players on the server with only 40 people online
Code:{$CLEO .cs} 0000: NOP :Main wait 0 if 0AB0: key_pressed 49 jf @Main 0A8D: 29@ = read_memory 0xB74490 size 4 virtual_protect 0 000A: 29@ += 0x4 0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0 for 30@ = 0 to 35584 step 0x100 0A8D: 31@ = read_memory 29@ size 1 virtual_protect 0 000A: 29@ += 0x1 if and 0029: 31@ >= 0x00 001B: 0x80 > 31@ then 005A: 31@ += 30@ // GOT THE PED. for 0@ = 0 to 999 if 0B23: samp is_player_connected 0@ then if 0B20: samp 1@ = actor_handle_by_samp_player_id 0@ then 31@++ end end end 0AD1: "%d streamed players" 1000 31@ end end // FOR ALL PEDS END jump @Main
{$CLEO .cs}
0000: NOP
:Main
wait 0
1@ = 0
if
0AB0: key_pressed 49
jf @Main
0A8D: 29@ = read_memory 0xB74490 size 4 virtual_protect 0
000A: 29@ += 0x4
0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0
for 30@ = 0 to 35584 step 0x100
0A8D: 31@ = read_memory 29@ size 1 virtual_protect 0
000A: 29@ += 0x1
if and
0029: 31@ >= 0x00
001B: 0x80 > 31@
then
005A: 31@ += 30@
1@ += 1
end
end
0AD1: "%d streamed players" 1000 1@
jump @Main
monday link said:Thank you both, both codes work properly
Btw just to make sure I didn't misunderstand it, could you tell me if that's right:
"for 0@ = 0 to 999" circles/loops all over again until it reaches 999 value and every time the conditions are fulfilled it "leaves" +1 to the value of the counter?