請問有沒有人懂用wirte_file和read_file進行保存?
我暫時只懂write_file但不懂運用read_file
請高手指教
其中的write_file
複製程式
public SaveLocation(id)
{
static Data[64], FilePath[64], iOrigin[3], szMapName[32];
get_mapname(szMapName, charsmax(szMapName));
format(FilePath, charsmax(FilePath), "/maps/%s_location.cfg", szMapName);
get_user_origin(id, iOrigin);
format(Data, charsmax(Data), "{^nOrigin:/%d %d %d^n}", iOrigin[0], iOrigin[1], iOrigin[2]);
write_file(FilePath, Data, -1);
set_hudmessage(75, 200, 200, -1.0, 0.86, 0, 6.0, 2.0, 0.1, 0.5, -1);
show_hudmessage(id,"Data successfully written to %s!", FilePath);
}