Hello guys, I did such a command, but after using it off the server
server log:
PHP Code:
stock InfoPath()
{
new path[56];
format(path, sizeof path, DOCK_PATH"info.ini");
return path;
}
stock NewTra()
{
dfile_Open(InfoPath());
printf("Otwiera path_info");
new last = dfile_ReadInt("last");
dfile_WriteInt("last", last++);
dfile_SaveFile();
dfile_CloseFile();
new path[56];
format(path, sizeof(path), DOCK_PATH"%d.ini", last++);
return path;
}
CMD:addzlecenie(playerid)
{
if(IsPlayerAdmin(playerid))
{
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
printf("Pobiera pozycje");
dfile_Create(NewTra());
printf("Tworzy nowe zlecenie");
dfile_WriteFloat("PosX", Pos[0]);
dfile_WriteFloat("PosY", Pos[1]);
dfile_WriteFloat("PosZ", Pos[2]);
dfile_SaveFile();
dfile_CloseFile();
SendClientMessage(playerid, -1, "Pomyślnie utworzono! :)");
}
}
PHP Code:
[21:41:57] [debug] AMX backtrace:
[21:41:57] [debug] #0 native fread () from samp-server.exe
[21:41:57] [debug] #1 000062d4 in public cmd_addzlecenie (0, 5243136) from gm.amx
[21:41:57] [debug] #2 native CallLocalFunction () from samp-server.exe
[21:41:57] [debug] #3 000070d0 in public OnPlayerCommandText (0, 5243136) from gm.amx
[21:41:57] [debug] Native backtrace:
[21:41:57] [debug] #0 7762bf47 in ?? () from C:\Windows\system32\ntdll.dll
[21:41:57] [debug] #1 776174d5 in ?? () from C:\Windows\system32\ntdll.dll
[21:41:57] [debug] #2 769f9dc6 in ?? () from C:\Windows\system32\kernel32.dll
[21:41:57] [debug] #3 00498e11 in ?? () from samp-server.exe
[21:41:57] [debug] #4 0044d9c9 in ?? () from samp-server.exe
[21:41:57] [debug] #5 0045856c in ?? () from samp-server.exe
[21:41:57] [debug] #6 00010100 in ?? ()
[21:41:57] [debug] #7 00459ce0 in ?? () from samp-server.exe
[21:41:57] [debug] #8 00459f80 in ?? () from samp-server.exe
[21:41:57] [debug] #9 0045a9c0 in ?? () from samp-server.exe
[21:41:57] [debug] #10 0044ff10 in ?? () from samp-server.exe
[21:41:57] [debug] #11 0044ff20 in ?? () from samp-server.exe
[21:41:57] [debug] #12 0044ff30 in ?? () from samp-server.exe
[21:41:57] [debug] #13 0044ff80 in ?? () from samp-server.exe
[21:41:57] [debug] #14 00457b00 in ?? () from samp-server.exe
[21:41:57] [debug] #15 0045a9d0 in ?? () from samp-server.exe
[21:41:57] [debug] #16 0045a9e0 in ?? () from samp-server.exe
[21:41:57] [debug] #17 0044ffd0 in ?? () from samp-server.exe
[21:41:57] [debug] #18 0045a9f0 in ?? () from samp-server.exe
[21:41:57] [debug] #19 0045aa00 in ?? () from samp-server.exe
[21:41:57] [debug] #20 0045afc0 in ?? () from samp-server.exe
[21:41:57] [debug] #21 0045aa10 in ?? () from samp-server.exe
[21:41:57] [debug] #22 004500e0 in ?? () from samp-server.exe
[21:41:57] [debug] #23 0045aa20 in ?? () from samp-server.exe
[21:41:57] [debug] #24 0045aa30 in ?? () from samp-server.exe
[21:41:57] [debug] #25 0045aa40 in ?? () from samp-server.exe
[21:41:57] [debug] #26 0045aa50 in ?? () from samp-server.exe
[21:41:57] [debug] #27 0045aa60 in ?? () from samp-server.exe
[21:41:57] [debug] #28 00457fb0 in ?? () from samp-server.exe
[21:41:57] [debug] #29 0045aa70 in ?? () from samp-server.exe
[21:41:57] [debug] #30 0045aa80 in ?? () from samp-server.exe
[21:41:57] [debug] #31 00451b10 in ?? () from samp-server.exe
[21:41:57] [debug] #32 0045aa90 in ?? () from samp-server.exe
[21:41:57] [debug] #33 0045aaa0 in ?? () from samp-server.exe
[21:41:57] [debug] #34 0045aab0 in ?? () from samp-server.exe
[21:41:57] [debug] #35 00451d10 in ?? () from samp-server.exe
[21:41:57] [debug] #36 00457fe0 in ?? () from samp-server.exe
[21:41:57] [debug] #37 0045aac0 in ?? () from samp-server.exe
[21:41:57] [debug] #38 004556a0 in ?? () from samp-server.exe
[21:41:57] [debug] #39 004556f0 in ?? () from samp-server.exe
[21:41:57] [debug] #40 00450220 in ?? () from samp-server.exe
[21:41:57] [debug] #41 00455730 in ?? () from samp-server.exe
[21:41:57] [debug] #42 00455780 in ?? () from samp-server.exe
[21:41:57] [debug] #43 00458000 in ?? () from samp-server.exe
[21:41:57] [debug] #44 0045aad0 in ?? () from samp-server.exe
[21:41:57] [debug] #45 0045aae0 in ?? () from samp-server.exe
[21:41:57] [debug] #46 004502a0 in ?? () from samp-server.exe
[21:41:57] [debug] #47 0045aaf0 in ?? () from samp-server.exe
[21:41:57] [debug] #48 0045ab00 in ?? () from samp-server.exe
[21:41:57] [debug] #49 0045ab10 in ?? () from samp-server.exe
[21:41:57] [debug] #50 0045ab20 in ?? () from samp-server.exe
[21:41:57] [debug] #51 0045ab30 in ?? () from samp-server.exe
[21:41:57] [debug] #52 00450410 in ?? () from samp-server.exe
[21:41:57] [debug] #53 00450790 in ?? () from samp-server.exe
[21:41:57] [debug] #54 00450460 in ?? () from samp-server.exe
[21:41:57] [debug] #55 0045ab40 in ?? () from samp-server.exe
[21:41:57] [debug] #56 00450470 in ?? () from samp-server.exe
[21:41:57] [debug] #57 004504c0 in ?? () from samp-server.exe
[21:41:57] [debug] #58 00450510 in ?? () from samp-server.exe
[21:41:57] [debug] #59 00450520 in ?? () from samp-server.exe
[21:41:57] [debug] #60 0045ab50 in ?? () from samp-server.exe
[21:41:57] [debug] #61 0045ab60 in ?? () from samp-server.exe
[21:41:57] [debug] #62 0045ab70 in ?? () from samp-server.exe
[21:41:57] [debug] #63 0045ab80 in ?? () from samp-server.exe
[21:41:57] [debug] #64 0045ab90 in ?? () from samp-server.exe
[21:41:57] [debug] #65 0045aba0 in ?? () from samp-server.exe
[21:41:57] [debug] #66 0045abb0 in ?? () from samp-server.exe
[21:41:57] [debug] #67 0045abc0 in ?? () from samp-server.exe
[21:41:57] [debug] #68 0045abd0 in ?? () from samp-server.exe
[21:41:57] [debug] #69 0045abe0 in ?? () from samp-server.exe
[21:41:57] [debug] #70 0045abf0 in ?? () from samp-server.exe
[21:41:57] [debug] #71 0045ac00 in ?? () from samp-server.exe
[21:41:57] [debug] #72 0045ac10 in ?? () from samp-server.exe
[21:41:57] [debug] #73 00455850 in ?? () from samp-server.exe
[21:41:57] [debug] #74 0045ac90 in ?? () from samp-server.exe
[21:41:57] [debug] #75 0045a130 in ?? () from samp-server.exe
[21:41:57] [debug] #76 0045a100 in ?? () from samp-server.exe
[21:41:57] [debug] #77 0045a120 in ?? () from samp-server.exe
[21:41:57] [debug] #78 0045a1b0 in ?? () from samp-server.exe
[21:41:57] [debug] #79 0045a1f0 in ?? () from samp-server.exe
[21:41:57] [debug] #80 0045a210 in ?? () from samp-server.exe
[21:41:57] [debug] #81 0045a260 in ?? () from samp-server.exe
[21:41:57] [debug] #82 0045a220 in ?? () from samp-server.exe
[21:41:57] [debug] #83 0045acb0 in ?? () from samp-server.exe
[21:41:57] [debug] #84 0045ad00 in ?? () from samp-server.exe
[21:41:57] [debug] #85 0045a2a0 in ?? () from samp-server.exe
[21:41:57] [debug] #86 0045a2d0 in ?? () from samp-server.exe
[21:41:57] [debug] #87 0045a2e0 in ?? () from samp-server.exe
[21:41:57] [debug] #88 0045a2f0 in ?? () from samp-server.exe
[21:41:57] [debug] #89 0045a300 in ?? () from samp-server.exe
[21:41:57] [debug] #90 0045a320 in ?? () from samp-server.exe
[21:41:57] [debug] #91 0045a360 in ?? () from samp-server.exe
[21:41:57] [debug] #92 0045a380 in ?? () from samp-server.exe
[21:41:57] [debug] #93 0045a3a0 in ?? () from samp-server.exe
[21:41:57] [debug] #94 0045a3c0 in ?? () from samp-server.exe
[21:41:57] [debug] #95 0045a3e0 in ?? () from samp-server.exe
[21:41:57] [debug] #96 0045a3f0 in ?? () from samp-server.exe
[21:41:57] [debug] #97 0045a400 in ?? () from samp-server.exe
[21:41:57] [debug] #98 0045a410 in ?? () from samp-server.exe
[21:41:57] [debug] #99 0045a420 in ?? () from samp-server.exe
[21:41:57] [debug] #100 0045a430 in ?? () from samp-server.exe
[21:41:57] [debug] #101 0045a440 in ?? () from samp-server.exe
[21:41:57] [debug] #102 0045a450 in ?? () from samp-server.exe
[21:41:57] [debug] #103 0045a460 in ?? () from samp-server.exe
[21:41:57] [debug] #104 0045a470 in ?? () from samp-server.exe
[21:41:57] [debug] #105 0045a480 in ?? () from samp-server.exe
[21:41:57] [debug] #106 0045a5b0 in ?? () from samp-server.exe
[21:41:57] [debug] #107 0045a4f0 in ?? () from samp-server.exe
[21:41:57] [debug] #108 0045a490 in ?? () from samp-server.exe
[21:41:57] [debug] #109 0045a550 in ?? () from samp-server.exe
[21:41:57] [debug] #110 0045a610 in ?? () from samp-server.exe
[21:41:57] [debug] #111 0045a640 in ?? () from samp-server.exe
[21:41:57] [debug] #112 0045a650 in ?? () from samp-server.exe
[21:41:57] [debug] #113 0045a660 in ?? () from samp-server.exe
[21:41:57] [debug] #114 0045a670 in ?? () from samp-server.exe
[21:41:57] [debug] #115 0045a680 in ?? () from samp-server.exe
[21:41:57] [debug] #116 0045a690 in ?? () from samp-server.exe
[21:41:57] [debug] #117 0045a6a0 in ?? () from samp-server.exe
[21:41:57] [debug] #118 0045a6d0 in ?? () from samp-server.exe
[21:41:57] [debug] #119 0045a700 in ?? () from samp-server.exe
[21:41:57] [debug] #120 0045a710 in ?? () from samp-server.exe
[21:41:57] [debug] #121 0045a730 in ?? () from samp-server.exe
[21:41:57] [debug] #122 0045a740 in ?? () from samp-server.exe
[21:41:57] [debug] #123 0045a760 in ?? () from samp-server.exe
[21:41:57] [debug] #124 0045aec0 in ?? () from samp-server.exe
[21:41:57] [debug] #125 0045a790 in ?? () from samp-server.exe
[21:41:57] [debug] #126 0045a7f0 in ?? () from samp-server.exe
[21:41:57] [debug] #127 0045a7a0 in ?? () from samp-server.exe
[21:41:57] [debug] #128 0045a7c0 in ?? () from samp-server.exe
[21:41:57] [debug] #129 0045a7d0 in ?? () from samp-server.exe
[21:41:57] [debug] #130 0045a7e0 in ?? () from samp-server.exe
[21:41:57] [debug] #131 0045a800 in ?? () from samp-server.exe
[21:41:57] [debug] #132 0045a820 in ?? () from samp-server.exe
[21:41:57] [debug] #133 0045a840 in ?? () from samp-server.exe
[21:41:57] [debug] #134 0045a860 in ?? () from samp-server.exe
[21:41:57] [debug] #135 0045a870 in ?? () from samp-server.exe
[21:41:57] [debug] #136 0045a880 in ?? () from samp-server.exe
[21:41:57] [debug] #137 0045a890 in ?? () from samp-server.exe
[21:41:57] [debug] #138 0045a8a0 in ?? () from samp-server.exe
[21:41:57] [debug] #139 0045a8d0 in ?? () from samp-server.exe
[21:41:57] [debug] #140 0045a900 in ?? () from samp-server.exe
[21:41:57] [debug] #141 0045a910 in ?? () from samp-server.exe
[21:41:57] [debug] #142 0045a920 in ?? () from samp-server.exe
[21:41:57] [debug] #143 0045a930 in ?? () from samp-server.exe
[21:41:57] [debug] #144 0045a950 in ?? () from samp-server.exe
[21:41:57] [debug] #145 0045a980 in ?? () from samp-server.exe
[21:41:57] [debug] #146 0045a9a0 in ?? () from samp-server.exe