A few file of me in txt file , every sec it will write list enemy [ sever TDM , write by CLEO ] and add messenger to samp , but it write everytime and write old again . I want it add messenger what have in txt fristtime and do not add messenger old if have new then add...
Code:
while true
wait 0
if
0@ == true
then
0A9A: 0@ = openfile "CLEO/enemytxt" mode "rt" // IF and SET
0AC8: 1@ = allocate_memory_size 260
0AD7: read_string_from_file 0@ to 1@ size 260 // IF and SET
chatmsg "{FFFF00}%s " -1 1@
2@ = true
end
if
2@ == true
then
free 1@
0A9B: closefile 0@
0B00: delete_file "CLEO/enemy.txt" // IF and SET
wait 500
0A9A: 6@ = openfile "CLEO/enemy.txt" mode "rt" // IF and SET
0AC8: 7@ = allocate_memory_size 260
0AD7: read_string_from_file 6@ to 7@ size 260 // IF and SET
0A9A: 8@ = openfile "CLEO/enemy.txt" mode "rt" // IF and SET
0AC8: 9@ = allocate_memory_size 260
0AD7: read_string_from_file 8@ to 9@ size 260 // IF and SET
if
0C21: stricmp string1 7@ string2 9@
then
free 7@
free 9@
0A9B: closefile 6@
0A9B: closefile 8@
0B00: delete_file "CLEO/enemy.txt" // IF and SET
2@ = true
else
0@ = true
end
end
end