#include <a_samp>#include <sscanf2>#include <zcmd>stock dini_Write(filename[],key[]){ if(!fexist(filename)) return false; new File:fwd; fwd=fopen(filename,io_write);if(fwd){fwrite(fwd,key);fclose(fwd);}}CMD:otlet(playerid,params[]){ new t[128],y,m,d,h,min,mp; if(sscanf(params,\"s[128]\",t)) return SendClientMessage(playerid,-1,\"/otlet (ötleted)\"); new msg[200],name[24]; getdate(y,m,d); gettime(h,min,mp); GetPlayerName(playerid,name,24); format(msg,200,\"%d.%d.%d %d:%d:%d | %s ötlete: %s\",y,m,d,h,min,mp,name,t); dini_Write(\"otletek.txt\",msg); format(msg,200,\"{a1b2c3}Sikeresen elküldted az ötleted ami a következõ: {ffbb00}%s\",t); SendClientMessage(playerid,-1,msg); return 1;}
CMD:otlet(playerid, params[]){ new otlet[128], File: log, str[128], year, month, day, hour, minute, second; if(sscanf(params, \"s[128]\", otlet)) return SendClientMessage(playerid, -1, \"Használat: /otlet (ötleted)\"); else { SendClientMessage(playerid, -1, \"Az ötleted elküldve a szerver tulajdonosának!\"); getdate(year, month, day); gettime(hour, minute, second);if(!fexist(\"Otletek.txt\")) { log = fopen(\"Otletek.txt\", io_write); format(str, 128, \"[%02d. %02d. %02d, %02d:%02d:%02d]%s: %s\\r\\n\", year, month, day, hour, minute, second, GetPlayerNameEx(playerid), otlet); fwrite(log, str); fclose(log); }else if(fexist(\"Otletek.txt\")){ log = fopen(\"Otletek.txt\", io_append); format(str, 128, \"[%02d. %02d. %02d, %02d:%02d:%02d]%s: %s\\r\\n\", year, month, day, hour, minute, second, GetPlayerNameEx(playerid), otlet); fwrite(log, str); fclose(log);} } return 1;}stock GetPlayerNameEx(playerid){ new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, MAX_PLAYER_NAME); return name;}
Ugyan aza hiba ..://