#include zcmd#include dini#include sscanfnew szin;public OnPlayerDisconnect(playerid, reason){new file[128];new name[MAX_PLAYER_NAME];GetPlayerName(playerid, name, sizeof(name));format(file,sizeof(file),\"/tReg/%s.ini\",name);if(fexist(file)){ dini_IntSet(file,\"Score\", GetPlayerScore(playerid)); dini_IntSet(file,\"Money\", GetPlayerMoney(playerid)); dini_IntSet(file,\"Deaths\", 0); dini_IntSet(file,\"Kills\", 0);}return 1;}public OnPlayerConnect(playerid){new file[128];new name[MAX_PLAYER_NAME];GetPlayerName(playerid, name, sizeof(name));format(file,sizeof(file),\"/tReg/%s.ini\",name);SetPlayerColor(playerid, dini_Int(file,\"Szin\"));return 1;}CMD:savecolor(playerid, params[]){if(sscanf(params, \"d\", szin)) return SendClientMessage(playerid, 0xFF0000AA, \"Használat: /savecolor 1(Zöld) | 2(Narancssárga) | 3(Sárga) | 4(Piros) | 5(Fekete) | 6(Fehér)\");if(szin > 6){new file[128];new name[MAX_PLAYER_NAME];GetPlayerName(playerid, name, sizeof(name));format(file,sizeof(file),\"/tReg/%s.ini\",name);switch (szin){ case 0: { SetPlayerColor(playerid,0x00ff1eAA); dini_IntSet(file,\"Szin\", 0x00ff1eAA); } case 1: { SetPlayerColor(playerid,0xffaa00AA); dini_IntSet(file,\"Szin\", 0xffaa00AA); } case 2: { SetPlayerColor(playerid,0xf7ff00AA); dini_IntSet(file,\"Szin\", 0xf7ff00AA); } case 3: { SetPlayerColor(playerid,0xff0000AA); dini_IntSet(file,\"Szin\", 0xff0000AA); } case 4: { SetPlayerColor(playerid,0xffffffAA); dini_IntSet(file,\"Szin\", 0xffffffAA); }}}return 1;}