Код:{$CLEO .cs} 0000: NOP wait 5000 :1 0AC8: 0@ = allocate_memory_size 64 0AC8: 1@ = allocate_memory_size 64 if 8AAB: file_exists "CLEO\FAKE.ini" then 0AF4: 0@ = read_string_from_ini_file "cleo\FAKE.ini" section "IP" key "server_ip" 0AF4: 1@ = read_string_from_ini_file "cleo\FAKE.ini" section "NAME" key "server_name" else 0AF5: write_string "new string value" to_ini_file "cleo\FAKE.ini" section "IP" key "server_ip" 0AF5: write_string "new string value" to_ini_file "cleo\FAKE.ini" section "NAME" key "server_name" 0AF4: 0@ = read_string_from_ini_file "cleo\FAKE.ini" section "IP" key "server_ip" 0AF4: 1@ = read_string_from_ini_file "cleo\FAKE.ini" section "NAME" key "server_name" end 0AF8: samp msg "la-la-la" color 0xFF61BB 0AF8: samp msg "%s..." color 0xFF61BB 0@ 0AF8: samp msg "la-la-la" color 0xFF61BB 0AF8: samp msg "%s" color 0xFF61BB 1@ 0AC9: free_allocated_memory 0@ 0AC9: free_allocated_memory 1@ 0B43: end_custom_thread
пак варнингов....
для этих опкодов память выделять не нужно
и вот тут должно быть вот так:
PHP:
if 0AAB: file_exists "CLEO\FAKE.ini"
then
0AF4: 0@ = read_string_from_ini_file "cleo\FAKE.ini" section "IP" key "server_ip"
0AF4: 1@ = read_string_from_ini_file "cleo\FAKE.ini" section "NAME" key "server_name"
else
0AF5: write_string "new string value" to_ini_file "cleo\FAKE.ini" section "IP" key "server_ip"
0AF5: write_string "new string value" to_ini_file "cleo\FAKE.ini" section "NAME" key "server_name"
0AF4: 0@ = read_string_from_ini_file "cleo\FAKE.ini" section "IP" key "server_ip"
0AF4: 1@ = read_string_from_ini_file "cleo\FAKE.ini" section "NAME" key "server_name"
end
т.е. вместo
PHP:
8AAB: ..
PHP:
0AAB: ..
и вообще т.к. ты используешь SF в своём скрипте, то обязательно нужно загрузить базу:
PHP:
:load_samp_base
if not 0@ = SAMP.Base()
then 0A93: end_custom_thread
end
while not SAMP.Available()
wait 100
end
result:
PHP:
{$CLEO .cs}
0000: NOP
wait 5000
:load_samp_base
if not 30@ = SAMP.Base()
then 0A93: end_custom_thread
end
while not SAMP.Available()
wait 100
end
:start
if 0AAB: file_exists "CLEO\FAKE.ini"
then
0AF4: 0@ = read_string_from_ini_file "cleo\FAKE.ini" section "IP" key "server_ip"
0AF4: 1@ = read_string_from_ini_file "cleo\FAKE.ini" section "NAME" key "server_name"
else
0AF5: write_string "new string value" to_ini_file "cleo\FAKE.ini" section "IP" key "server_ip"
0AF5: write_string "new string value" to_ini_file "cleo\FAKE.ini" section "NAME" key "server_name"
0AF4: 0@ = read_string_from_ini_file "cleo\FAKE.ini" section "IP" key "server_ip"
0AF4: 1@ = read_string_from_ini_file "cleo\FAKE.ini" section "NAME" key "server_name"
end
0AF8: samp msg "la-la-la" color 0xFF61BB
0AF8: samp msg "%s..." color 0xFF61BB 0@
0AF8: samp msg "la-la-la" color 0xFF61BB
0AF8: samp msg "%s" color 0xFF61BB 1@
0A93: end_custom_thread