#include <a_samp>#include <core>#include <float>new glob0;new glob4[244];new glob3D4[100][140];new glob20DB4[256];new glob211B4[500];new glob21984[500][3]; public OnGameModeInit(){glob0 = funcidx( != -1;glob4 = funcidx(104) != -1;if(-1 != funcidx(204)){return CallLocalFunction(284, 364);}return 1;}public OnPlayerCommandText(playerid, cmdtext){if(glob0 && !CallLocalFunction(368, 464, playerid, cmdtext)){return 1;}new var0 = 1, var1[32];while(cmdtext[++var0] > 32){var1[var0 - 1] = tolower(cmdtext[var0]);}format(var1, 32, \"cmd_%s\", var1);while(cmdtext[var0] == 32){var0++;}if(!cmdtext[var0]){if(glob4){ return CallLocalFunction(504, 604, playerid, cmdtext);}return CallLocalFunction(var1, 640, playerid, 652);}if(glob4){return CallLocalFunction(660, 760, playerid, cmdtext);}return CallLocalFunction(var1, 788, playerid, cmdtext);}function508(arg0){return fexist(arg0);}function534(arg0){if(fexist(arg0)){return 0;}new File:var0 = 0;var0 = fopen(arg0, 1);if(var0){fclose(var0);return 1;}return 0;}function614(arg0, arg1, arg2){new var0 = strlen(arg1);new var1 = strlen(arg2);if(!var0 || var0 + var1 + 2 > 255){return 0;}new File:var2 = 0, File:var3 = 0;new var4[255];new var5 = 0;format(var4, 255, \"%s.part\", arg0);fremove(var4);var2 = fopen(arg0, 0);if(!var2){return 0;}var3 = fopen(var4, 1);if(!var3){fclose(var2);return 0;}while(fread(var2, var4, 255)){if(!var5 && var4[var0] == 61 && !strcmp(var4, arg1, true, var0)){ format(var4, 255, \"%s=%s\", arg1, arg2); var5 = 1;}else{ function1064(var4);}fwrite(var3, var4);fwrite(var3, \"\\r\\n\");}if(!var5){format(var4, 255, \"%s=%s\", arg1, arg2);fwrite(var3, var4);fwrite(var3, \"\\r\\n\");}fclose(var2);fclose(var3);format(var4, 255, \"%s.part\", arg0);if(function128C(var4, arg0)){return fremove(var4);}return 0;}functionBE4(arg0, arg1, arg2){new var0[255];format(var0, 255, \"%d\", arg2);return function614(arg0, arg1, var0);}functionC7C(arg0, arg1, arg2){new var0[255];format(var0, 255, \"%f\", arg2);return function614(arg0, arg1, var0);}functionD14(arg0, arg1){new var0[255];new var1 = strlen(arg1);if(!var1 || var1 + 2 > 255){return var0;}new File:var2 = 0;var2 = fopen(arg0, 0);if(!var2){return var0;}while(fread(var2, var0, 255)){if(var0[var1] == 61 && !strcmp(var0, arg1, true, var1)){ function1064(var0); strmid(var0, var0, var1 + 1, strlen(var0), 255); fclose(var2); return var0;}}fclose(var2);return var0;}function1064(arg0){new var0 = strlen(arg0);if(!arg0){return 0;}if(arg0[var0 - 1] == 10 || arg0[var0 - 1] == 13){arg0[var0 - 1] = 0;if(!arg0){ return 0;}if(arg0[var0 - 2] == 10 || arg0[var0 - 2] == 13){ arg0[var0 - 2] = 0;}}return 0;}function128C(arg0, arg1){new File:var0 = 0, File:var1 = 0;if(!fexist(arg0)){return 0;}var0 = fopen(arg0, 0);if(!var0){return 0;}var1 = fopen(arg1, 1);if(!var1){fclose(var0);return 0;}new var2[255];while(fread(var0, var2, 255)){function1064(var2);format(var2, 255, \"%s\\r\\n\", var2);fwrite(var1, var2);}fclose(var0);fclose(var1);return 1;}public OnFilterScriptInit(){print(\"\\n--------------------------------------\");print(\" Gang Systyem v1.5\");print(\"--------------------------------------\\n\");LoadData();return 1;}public OnFilterScriptExit(){print(\"\\n--------------------------------------\");print(\" Gang Systyem v1.5\");print(\"--------------------------------------\\n\");return 1;}public LoadData(){for(new var0 = 20; var0 < 100; var0++){new var1[256];format(glob20DB4, 256, \"Gangs/GANG_%d.ini\", var0);if(function508(glob20DB4)){ var1 = functionD14(glob20DB4, \"Name\"); strmid(glob3D4[var0], var1, 0, 256, 256); var1 = functionD14(glob20DB4, \"ID\"); glob3D4[var0][128] = strval(var1); var1 = functionD14(glob20DB4, \"Spawn_X\"); glob3D4[var0][129] = strval(var1); var1 = functionD14(glob20DB4, \"Spawn_Y\"); glob3D4[var0][130] = strval(var1); var1 = functionD14(glob20DB4, \"Spawn_Z\"); glob3D4[var0][131] = strval(var1); var1 = functionD14(glob20DB4, \"Spawn_A\"); glob3D4[var0][132] = strval(var1); var1 = functionD14(glob20DB4, \"Spawn_Interior\"); glob3D4[var0][133] = strval(var1); var1 = functionD14(glob20DB4, \"Spawn_VirtualWorld\"); glob3D4[var0][134] = strval(var1); var1 = functionD14(glob20DB4, \"Gang_Cash\"); glob3D4[var0][135] = strval(var1); var1 = functionD14(glob20DB4, \"Gang_Skin\"); glob3D4[var0][136] = strval(var1); var1 = functionD14(glob20DB4, \"Gang_Weapon\"); glob3D4[var0][137] = strval(var1); var1 = functionD14(glob20DB4, \"Gang_Kills\"); glob3D4[var0][138] = strval(var1); var1 = functionD14(glob20DB4, \"Gang_Deaths\"); glob3D4[var0][139] = strval(var1); format(glob20DB4, 256, \"Gang : ID = %d | Name = %s Loaded.\", var0, glob3D4[var0][0]); printf(\"%s\", glob20DB4);}}return 0;}public OnPlayerConnect(playerid){format(glob20DB4, 256, \"Gangs/Players/%s.ini\", function5A70(playerid));if(function508(glob20DB4)){OnGangLogin(playerid);}else{new File:var0 = fopen(glob20DB4, 1);if(var0){ new var1[32]; format(var1, 32, \"gang_member=%d\\n\", glob21984[playerid][0]); fwrite(var0, var1); format(var1, 32, \"gang_leader=%d\\n\", glob21984[playerid][1]); fwrite(var0, var1); format(var1, 32, \"gang_rank=%d\\n\", glob21984[playerid][2]); fwrite(var0, var1);}fclose(var0);OnGangLogin(playerid);}return 1;}public OnPlayerDisconnect(playerid, reason){format(glob20DB4, 256, \"Gangs/Players/%s.ini\", function5A70(playerid));new File:var0 = fopen(glob20DB4, 1);if(var0){new var1[32];format(var1, 32, \"gang_member=%d\\n\", glob21984[playerid][0]);fwrite(var0, var1);format(var1, 32, \"gang_leader=%d\\n\", glob21984[playerid][1]);fwrite(var0, var1);format(var1, 32, \"gang_rank=%d\\n\", glob21984[playerid][2]);fwrite(var0, var1);}fclose(var0);return 1;}public OnPlayerSpawn(playerid){for(new var0 = 20; var0 < 100; var0++){format(glob20DB4, 256, \"Gangs/GANG_%d.ini\", var0);if(function508(glob20DB4)){ if(glob21984[playerid][0] == glob3D4[var0][128]) { GivePlayerWeapon(playerid, glob3D4[var0][137], 999999); SetPlayerInterior(playerid, glob3D4[var0][133]); SetPlayerVirtualWorld(playerid, glob3D4[var0][134]); SetPlayerPos(playerid, glob3D4[var0][129], glob3D4[var0][130], glob3D4[var0][131]); SetPlayerSkin(playerid, glob3D4[var0][136]); }}}return 1;}public OnGangLogin(playerid){if(IsPlayerNPC(playerid)){return 1;}format(glob20DB4, 256, \"Gangs/Players/%s.ini\", function5A70(playerid));new File:var0 = fopen(glob20DB4, 0);if(var0){new var1[256], var2[256];new var3[256];while(fread(var0, var3)){ var1 = function5AF0(var3); if(!strcmp(var1, \"gang_member\", true)) { var2 = function5C3C(var3); glob21984[playerid][0] = strval(var2); } if(!strcmp(var1, \"gang_leader\", true)) { var2 = function5C3C(var3); glob21984[playerid][1] = strval(var2); } if(!strcmp(var1, \"gang_rank\", true)) { var2 = function5C3C(var3); glob21984[playerid][2] = strval(var2); }}fclose(var0);}return 1;}public OnPlayerDeath(playerid, killerid, reason){glob3D4[killerid][138]++;glob3D4[playerid][139]++;return 1;}public OnPlayerText(playerid, text){if(IsPlayerConnected(playerid)){if(text == 33){ SendClientMessage(playerid, 0xAA0000AA, \"{00C0FF}Küldtél, egy banda üzenetet.\"); new var0[24], var1[128]; GetPlayerName(playerid, var0, 24); format(var1, 128, \"{00C0FF}[banda Chat]{6EF83C}%s: {FFFFFF}%s\", var0, text + 4); printf(\"%s\", var1); for(new var2 = 0; var2 < 500; var2++) { if(IsPlayerConnected(var2)) { if(glob21984[var2][0] || glob21984[var2][1] == glob21984[playerid][0] || glob21984[playerid][1]) { SendClientMessage(var2, GetPlayerColor(playerid), var1); } } } return 0;}}return 1;}public cmd_gang(arg0){new var0[256];format(var0, 256, \"{00C0FF}Banda Keszitese\\n{00C0FF}Banda Valltas\");ShowPlayerDialog(arg0, 100, 2, 148748, var0, 148800, 148828);return 1;}public cmd_gangs(arg0){new var0[128];for(new var1 = 0; var1 < 100; var1++){if(glob3D4[var1][128] || glob3D4[var1][0]){ format(var0, 128, \"{FFFFFF}%s\", glob3D4[var1][0]); ShowPlayerDialog(arg0, 116, 0, 148892, var0, 148952, 148964);}}return 1;}public cmd_mygang(arg0){new var0[128];for(new var1 = 0; var1 < 100; var1++){if(glob3D4[var1][128] || glob3D4[var1][0]){ format(var0, 128, \"{00C0FF}Banda neve: {FFFFFF}%s\", glob3D4[var1][0]); ShowPlayerDialog(arg0, 116, 0, 149112, var0, 149172, 149184);}}return 1;}public OnDialogResponse(playerid, arg1, arg2, arg3, arg4){if(arg1 == 100){if(arg2 == 1){ if(!arg3) { format(glob20DB4, 256, \"{FFAF00}[iNFO]{6EF83C}Válassz egy nevet a bandának.\"); ShowPlayerDialog(playerid, 103, 1, 149420, 134580, 149468, 149496); } if(arg3 == 1) { format(glob20DB4, 256, \"{00C0FF}Spawn Valtas\\n{00C0FF}Nev Valtas\\n{00C0FF}Sor Valtas\\n{00C0FF}Skin Valtas\\n{00C0FF}Fegyver Valtas\"); ShowPlayerDialog(playerid, 102, 2, 149932, 134580, 150084, 150104); }}}if(arg1 == 101){if(arg2 == 1){ new var0 = 20; while(++var0 < 100) { format(glob20DB4, 256, \"Gangs/GANG_%d.ini\", var0); if(function508(glob20DB4)) { if(glob21984[playerid][1] == glob3D4[var0][128]) { function614(glob20DB4, \"Name\", arg4); format(glob20DB4, 256, \"{00C0FF}Banda új neve: {00C0FF}(ID:%d) %s\", glob3D4[var0][128], arg4); SendClientMessage(playerid, 0xFF0000FF, glob20DB4); } else { } } else { } }}}if(arg1 == 102){if(arg2 == 1){ if(!arg3) { new var0 = 20; while(++var0 < 100) { format(glob20DB4, 256, \"Gangs/GANG_%d.ini\", var0); if(function508(glob20DB4)) { if(glob21984[playerid][1] == glob3D4[var0][128]) { GetPlayerPos(playerid, glob3D4[var0], glob3D4[var0], glob3D4[var0]); functionC7C(glob20DB4, \"Spawn_X\", glob3D4[var0][129]); functionC7C(glob20DB4, \"Spawn_Y\", glob3D4[var0][130]); functionC7C(glob20DB4, \"Spawn_Z\", glob3D4[var0][131]); functionBE4(glob20DB4, \"Spawn_Interior\", GetPlayerInterior(playerid)); functionBE4(glob20DB4, \"Spawn_VirtualWorld\", GetPlayerVirtualWorld(playerid)); format(glob20DB4, 256, \"{00C0FF}A spawn pontot {F81414}%s {00C0FF}állították.\", glob3D4[var0][0]); SendClientMessage(playerid, 0xFF0000FF, glob20DB4); } } } } if(arg3 == 1) { format(glob20DB4, 256, \"{FFAF00}[iNFO]{6EF83C}Válassz egy nevet a bandának.\"); ShowPlayerDialog(playerid, 101, 1, 151192, 134580, 151232, 151260); } if(arg3 == 2) { format(glob20DB4, 256, \"{00C0FF}Rank1\\n{00C0FF}Rank2\\n{00C0FF}Rank3\\n{00C0FF}Rank4\\n{00C0FF}Rank5\"); ShowPlayerDialog(playerid, 104, 2, 151560, 134580, 151608, 151628); } if(arg3 == 3) { format(glob20DB4, 256, \"{FFAF00}[iNFO]{6EF83C}Írd be, a skin ID-t.\"); ShowPlayerDialog(playerid, 107, 1, 151844, 134580, 151892, 151912); } if(arg3 == 4) { format(glob20DB4, 256, \"{FFAF00}[iNFO]{6EF83C}Írd be, a fegyver ID-t.\"); ShowPlayerDialog(playerid, 108, 1, 152136, 134580, 152192, 152212); }}}if(arg1 == 107){if(arg2 == 1){ new var0 = 20; while(++var0 < 100) { new var1[128]; glob3D4[var0][136] = strval(arg4); functionBE4(glob20DB4, \"Skin\", glob3D4[var0][136]); SetPlayerSkin(playerid, glob3D4[var0][136]); format(var1, 128, \"{FFAF00}[iNFO]{6EF83C}Banda skin:{F81414}%d\", glob3D4[var0][136]); ShowPlayerDialog(playerid, 116, 0, 152440, var1, 152480, 152492); }}}if(arg1 == 108){if(arg2 == 1){ new var0 = 20; while(++var0 < 100) { new var1[128]; glob3D4[var0][137] = strval(arg4); functionBE4(glob20DB4, \"Weapon\", glob3D4[var0][137]); GivePlayerWeapon(playerid, glob3D4[var0][137], 999999); format(var1, 128, \"{FFAF00}[iNFO]{6EF83C}Banda fegyver:{F81414}%d\", glob3D4[var0][137]); ShowPlayerDialog(playerid, 116, 0, 152720, var1, 152760, 152772); }}}if(arg1 == 103){if(arg2 == 1){ new var0 = 20; while(++var0 < 100) { format(glob20DB4, 256, \"Gangs/GANG_%d.ini\", var0); if(function508(glob20DB4)) { } else { function534(glob20DB4); function614(glob20DB4, \"Name\", arg4); functionBE4(glob20DB4, \"ID\", var0); functionC7C(glob20DB4, \"Spawn_X\", 3281544397); functionC7C(glob20DB4, \"Spawn_Y\", 1151490571); functionC7C(glob20DB4, \"Spawn_Z\", 1112925615); functionC7C(glob20DB4, \"Spawn_A\", 1112925615); functionBE4(glob20DB4, \"Spawn_Interior\", 0); functionBE4(glob20DB4, \"Spawn_VirtualWorld\", 0); functionBE4(glob20DB4, \"Gang_Cash\", 135); functionBE4(glob20DB4, \"Gang_Skin\", glob3D4[var0][136]); functionBE4(glob20DB4, \"Gang_Weapon\", glob3D4[var0][137]); functionBE4(glob20DB4, \"Gang_Kills\", glob3D4[var0][138]); functionBE4(glob20DB4, \"Gang_Deaths\", glob3D4[var0][139]); function614(glob20DB4, \"Gang_Rank1\", \"No Rank\"); function614(glob20DB4, \"Gang_Rank2\", \"No Rank\"); function614(glob20DB4, \"Gang_Rank3\", \"No Rank\"); function614(glob20DB4, \"Gang_Rank4\", \"No Rank\"); function614(glob20DB4, \"Gang_Rank5\", \"No Rank\"); functionBE4(glob20DB4, \"Gang_House\", 4294967295); format(glob20DB4, 256, \"{FFAF00}[banda Info]{C3C3C3}%s(%d) {F81414}banda létrehozza. {C3C3C3}[%s]\", function5A70(playerid), playerid, arg4); SendClientMessageToAll(0xFF828200, glob20DB4); format(glob20DB4, 256, \"{FFAF00}[iNFO]{6EF83C}Banda név:{F81414}%s\\n{FFAF00}[iNFO]{6EF83C}Maxim id {F81414}%d\", arg4, var0); ShowPlayerDialog(playerid, 116, 0, 154436, 134580, 154476, 154488); glob21984[playerid][1] = var0; glob21984[playerid][0] = var0; } }}}if(arg1 == 104){if(arg2 == 1){ new var0 = 20; while(++var0 < 100) { format(glob20DB4, 256, \"Gangs/GANG_%d.ini\", var0); if(function508(glob20DB4)) { if(glob21984[playerid][1] == glob3D4[var0][128]) { if(!arg3) { glob211B4[playerid] = 1; format(glob20DB4, 256, \"{6EF83C}Válassz egy nevet a Rank 1-nek.\"); ShowPlayerDialog(playerid, 105, 1, 154760, 134580, 154812, 154840); } if(arg3 == 1) { glob211B4[playerid] = 2; format(glob20DB4, 256, \"{6EF83C}Válassz egy nevet a Rank 2-nek.\"); ShowPlayerDialog(playerid, 105, 1, 155056, 134580, 155108, 155136); } if(arg3 == 2) { glob211B4[playerid] = 3; format(glob20DB4, 256, \"{6EF83C}Válassz egy nevet a Rank 3-nek.\"); ShowPlayerDialog(playerid, 105, 1, 155352, 134580, 155404, 155432); } if(arg3 == 3) { glob211B4[playerid] = 4; format(glob20DB4, 256, \"{6EF83C}Válassz egy nevet a Rank 4-nek.\"); ShowPlayerDialog(playerid, 105, 1, 155648, 134580, 155700, 155728); } if(arg3 == 4) { glob211B4[playerid] = 5; format(glob20DB4, 256, \"{6EF83C}Válasz egy nevet a Rank 5-nek.(Leader)\"); ShowPlayerDialog(playerid, 105, 1, 155940, 134580, 155992, 156020); } } } }}}if(arg1 == 105){if(arg2 == 1){ new var0 = 20; while(++var0 < 100) { format(glob20DB4, 256, \"Gangs/GANG_%d.ini\", var0); if(function508(glob20DB4)) { if(glob21984[playerid][1] == glob3D4[var0][128]) { if(glob211B4[playerid] == 1) { function614(glob20DB4, \"Gang_Rank1\", arg4); glob211B4[playerid] = 0; format(glob20DB4, 256, \"{FFAF00}[iNFO]{6EF83C}új Rank név {F81414}: %s\", arg4); SendClientMessage(playerid, 0x00CC00FF, glob20DB4); } if(glob211B4[playerid] == 2) { function614(glob20DB4, \"Gang_Rank2\", arg4); glob211B4[playerid] = 0; format(glob20DB4, 256, \"{FFAF00}[iNFO]{6EF83C}új Rank név {F81414}új Rank név : %s\", arg4); SendClientMessage(playerid, 0x00CC00FF, glob20DB4); } if(glob211B4[playerid] == 3) { function614(glob20DB4, \"Gang_Rank3\", arg4); glob211B4[playerid] = 0; format(glob20DB4, 256, \"{FFAF00}[iNFO]{6EF83C}új Rank név {F81414}új Rank név : %s\", arg4); SendClientMessage(playerid, 0x00CC00FF, glob20DB4); } if(glob211B4[playerid] == 4) { function614(glob20DB4, \"Gang_Rank4\", arg4); glob211B4[playerid] = 0; format(glob20DB4, 256, \"{FFAF00}[iNFO]{6EF83C}új Rank név {F81414}új Rank név : %s\", arg4); SendClientMessage(playerid, 0x00CC00FF, glob20DB4); } if(glob211B4[playerid] == 5) { function614(glob20DB4, \"Gang_Rank5\", arg4); glob211B4[playerid] = 0; format(glob20DB4, 256, \"{FFAF00}[iNFO]{6EF83C}új Rank név {F81414}új Rank név : %s\", arg4); SendClientMessage(playerid, 0x00CC00FF, glob20DB4); } } } }}}return 1;}function5A70(playerid){new var0[24];GetPlayerName(playerid, var0, 24);return var0;}function5AF0(arg0){new var0[256];var0[0] = 0;if(strfind(arg0, \"=\", true, 0) == -1){return var0;}strmid(var0, arg0, 0, strfind(arg0, \"=\", true, 0), 256);return var0;}function5C3C(arg0){new var0[256];var0[0] = 0;if(strfind(arg0, \"=\", true, 0) == -1){return var0;}strmid(var0, arg0, strfind(arg0, \"=\", true, 0) + 1, strlen(arg0), 256);return var0;}