Hi,
For one of my CLEO, I need to have a list of player that are already written in a .txt file. I tried this code from a Russian forum, but it only gives me the last name of the text file. (and I don't speak russian !)
Can you help me please ?
NOTE: In fact I think the problem is in: "0C14: strcmp string1 9@ string2 11@ " because I can't go trhough that IF
This part
works very well it gives me the complete list of the .txt file.
But this part
does not get me anything instead of the LAST NAME in the .TXT file. Maybe because of the double LOOP ?
(and yes the players where conected when I tried it)
For one of my CLEO, I need to have a list of player that are already written in a .txt file. I tried this code from a Russian forum, but it only gives me the last name of the text file. (and I don't speak russian !)
Can you help me please ?
Code:
0A9A: 8@ = openfile "CLEO\test.txt" mode "rt" // IF and SET
0AC8: 9@ = allocate_memory_size 260
WHILE 8AD6: end_of_file 8@ reached
wait 0
0AD7: read_string_from_file 8@ to 9@ size 260 // IF and SET
0AF8: samp add_message_to_chat "%s" color 0xFF61BB 9@
for 10@ = 0 to 1000
if
samp.IsPlayerConnected(10@)
then
11@ = samp.GetPlayerNickname(10@)
if
0C14: strcmp string1 9@ string2 11@
then
0AF8: samp add_message_to_chat "%s" color 0xFFFFFF 11@
// Do things here
end
end
end
end
NOTE: In fact I think the problem is in: "0C14: strcmp string1 9@ string2 11@ " because I can't go trhough that IF
This part
Code:
0AD7: read_string_from_file 8@ to 9@ size 260 // IF and SET
0AF8: samp add_message_to_chat "%s" color 0xFF61BB 9@
works very well it gives me the complete list of the .txt file.
But this part
Code:
if 0C14: strcmp string1 9@ string2 11@
then
0AF8: samp add_message_to_chat "%s" color 0xFFFFFF 11@
(and yes the players where conected when I tried it)