#include <a_samp>#pragma tabsize 0#define COLOR_WHITE 0xFFFFFFAA#define COLOR_RED 0xAA3333AA#define COLOR_GREEN 0x33AA33AA#define COLOR_ORANGE 0xFF9900AA#define COLOR_YELLOW 0xFFFF00AA#define MAX_GANGS 32#define MAX_GANG_NAME 16#define MAX_GANG_MEMBERS 6new gangNames[MAX_GANGS][MAX_GANG_NAME];new gangInfo[MAX_GANGS][3];new playerGang[MAX_PLAYERS];new gangMembers[MAX_GANGS][MAX_GANG_MEMBERS];new gangInvite[MAX_PLAYERS];new playerColors[100] = {0xFF8C13FF,0xC715FFFF,0x20B2AAFF,0xDC143CFF,0x6495EDFF,0xf0e68cFF,0x778899FF,0xFF1493FF,0xF4A460FF,0xEE82EEFF,0xFFD720FF,0x8b4513FF,0x4949A0FF,0x148b8bFF,0x14ff7fFF,0x556b2fFF,0x0FD9FAFF,0x10DC29FF,0x534081FF,0x0495CDFF,0xEF6CE8FF,0xBD34DAFF,0x247C1BFF,0x0C8E5DFF,0x635B03FF,0xCB7ED3FF,0x65ADEBFF,0x5C1ACCFF,0xF2F853FF,0x11F891FF,0x7B39AAFF,0x53EB10FF,0x54137DFF,0x275222FF,0xF09F5BFF,0x3D0A4FFF,0x22F767FF,0xD63034FF,0x9A6980FF,0xDFB935FF,0x3793FAFF,0x90239DFF,0xE9AB2FFF,0xAF2FF3FF,0x057F94FF,0xB98519FF,0x388EEAFF,0x028151FF,0xA55043FF,0x0DE018FF,0x93AB1CFF,0x95BAF0FF,0x369976FF,0x18F71FFF,0x4B8987FF,0x491B9EFF,0x829DC7FF,0xBCE635FF,0xCEA6DFFF,0x20D4ADFF,0x2D74FDFF,0x3C1C0DFF,0x12D6D4FF,0x48C000FF,0x2A51E2FF,0xE3AC12FF,0xFC42A8FF,0x2FC827FF,0x1A30BFFF,0xB740C2FF,0x42ACF5FF,0x2FD9DEFF,0xFAFB71FF,0x05D1CDFF,0xC471BDFF,0x94436EFF,0xC1F7ECFF,0xCE79EEFF,0xBD1EF2FF,0x93B7E4FF,0x3214AAFF,0x184D3BFF,0xAE4B99FF,0x7E49D7FF,0x4C436EFF,0xFA24CCFF,0xCE76BEFF,0xA04E0AFF,0x9F945CFF,0xDCDE3DFF,0x10C9C5FF,0x70524DFF,0x0BE472FF,0x8A2CD7FF,0x6152C2FF,0xCF72A9FF,0xE59338FF,0xEEDC2DFF,0xD8C762FF,0x3FE65CFF};forward PlayerLeaveGang(playerid);public OnFilterScriptInit(){ print(\"\\n--------------------------------------\"); print(\" Banda Filterscript\"); print(\"--------------------------------------\\n\"); return 1;}public OnFilterScriptExit(){ return 1;} public PlayerLeaveGang(playerid) { new string[256]; new playername[MAX_PLAYER_NAME]; new gangnum = playerGang[playerid];if(gangnum > 0) { for(new i = 0; i < gangInfo[gangnum][1]; i++) { if(gangMembers[gangnum]==playerid) { gangInfo[gangnum][1]--; for(new j = i; j < gangInfo[gangnum][1]; j++) { gangMembers[gangnum][j]=gangMembers[gangnum][j+1]; } if(gangInfo[gangnum][1]<1) { gangInfo[gangnum][0]=0; gangInfo[gangnum][1]=0; } for(new j = 0; j < gangInfo[gangnum][1]; j++) { GetPlayerName(playerid, playername, MAX_PLAYER_NAME); format(string, sizeof(string),\"%s Kilépett a bandádból.\", playername); SendClientMessage(gangMembers[gangnum][j], COLOR_ORANGE, string); } format(string, sizeof(string),\"Kiléptél a \'%s\' nevû (id: %d) bandából.\", gangNames[gangnum], gangnum); SendClientMessage(playerid, COLOR_ORANGE, string); playerGang[playerid]=0; return; } } } else { SendClientMessage(playerid, COLOR_RED, \"Te nem vagy bandatag.\"); }} public OnPlayerCommandText(playerid,cmdtext[]){ new string[256]; new sendername[MAX_PLAYER_NAME]; new giveplayer[MAX_PLAYER_NAME]; new cmd[256]; new tmp[256]; new giveplayerid,idx; cmd = strtok(cmdtext, idx); if(strcmp(cmd, \"/banda\", true) == 0) { new gangcmd, gangnum; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, \"HASZNÁLAT: /banda [alapít/csatlakoz/kilép] [név/szám]\"); return 1; } giveplayerid = strval(tmp); if(strcmp(tmp, \"alapít\", true)==0) gangcmd = 1; else if(strcmp(tmp, \"csatlakoz\", true)==0) gangcmd = 2; else if(strcmp(tmp, \"meghív\", true)==0) gangcmd = 3; else if(strcmp(tmp, \"kilép\", true)==0) gangcmd = 4; tmp = strtok(cmdtext, idx); if(gangcmd < 4 && !strlen(tmp)) { if(gangcmd==0) SendClientMessage(playerid, COLOR_WHITE, \"HASZNÁLAT: /banda [alapít/csatlakoz/meghív/kilép] [név/szám]\"); else if(gangcmd==1) SendClientMessage(playerid, COLOR_WHITE, \"HASZNÁLAT: /banda [alapít] [név]\"); else if(gangcmd==2) SendClientMessage(playerid, COLOR_WHITE, \"HASZNÁLAT: /banda [csatlakoz] [név/szám]\"); else if(gangcmd==3) SendClientMessage(playerid, COLOR_WHITE, \"HASZNÁLAT: /banda [meghív] [JátékosID]\"); return 1; } if(gangcmd==1) { if(playerGang[playerid]>0) { SendClientMessage(playerid, COLOR_RED, \"Már bandatag vagy!\"); return 1; } for(new i = 1; i < MAX_GANGS; i++) { if(gangInfo[0]==0) { format(gangNames, MAX_GANG_NAME, \"%s\", tmp); gangInfo[0]=1; gangInfo[1]=1; gangInfo[2]=playerColors[playerid]; gangMembers[0] = playerid; format(string, sizeof(string),\"Alapítottál egy bandát \'%s\' néven. (id: %d)\", gangNames, i); SendClientMessage(playerid, COLOR_GREEN, string); playerGang[playerid]=i; return 1; } } return 1; //Join Gang// } else if (gangcmd==2) { gangnum = strval(tmp); if(gangInfo[gangnum][0]==0) { SendClientMessage(playerid, COLOR_RED, \"Ilyen banda nem létezik!\"); return 1; } if(gangInvite[playerid]!=gangnum) { SendClientMessage(playerid, COLOR_RED, \"Meg kell hívniuk hogy csatlakozhass.\"); return 1; } if(gangInfo[gangnum][1] < MAX_GANG_MEMBERS) { new i = gangInfo[gangnum][1]; gangMembers[gangnum] = playerid; GetPlayerName(playerid, sendername, MAX_PLAYER_NAME); for(new j = 0; j < gangInfo[gangnum][1]; j++) { format(string, sizeof(string),\"%s has joined your gang.\", sendername); SendClientMessage(gangMembers[gangnum][j], COLOR_ORANGE, string); } gangInfo[gangnum][1]++; playerGang[playerid] = gangnum; SetPlayerColor(playerid,gangInfo[gangnum][2]); format(string, sizeof(string),\"Beléptél \'%s\' nevû (id: %d) bandába.\", gangNames[gangnum], gangnum); SendClientMessage(playerid, COLOR_GREEN, string); return 1; }// } SendClientMessage(playerid, COLOR_RED, \"A banda megtelt.\"); return 1; } else if (gangcmd==3) { giveplayerid = strval(tmp); if(playerGang[playerid]==0) { SendClientMessage(playerid, COLOR_RED, \"Nem vagy bandatag!\"); return 1; } if(IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string),\"Meghívott egy banda, a neve: %s.\", giveplayer); SendClientMessage(playerid, COLOR_GREEN, string); format(string, sizeof(string),\"Meghívott egy banda %s-ból \'%s\'-ba/be (id: %d)\", sendername, gangNames[playerGang[playerid]],playerGang[playerid]); SendClientMessage(giveplayerid, COLOR_GREEN, string); gangInvite[giveplayerid]=playerGang[playerid]; } else SendClientMessage(playerid, COLOR_RED, \"Nincs ilyen játékos\"); } else if (gangcmd==4) { PlayerLeaveGang(playerid); } return 1; } if(strcmp(cmd, \"/bandainfo\", true) == 0) { new gangnum; tmp = strtok(cmdtext, idx); if(!strlen(tmp) && playerGang[playerid]==0) { SendClientMessage(playerid, COLOR_WHITE, \"HASZNÁLAT: /bandainfo [szám]\"); return 1; } else if (!strlen(tmp)) gangnum = playerGang[playerid]; else gangnum = strval(tmp); if(gangInfo[gangnum][0]==0) { SendClientMessage(playerid, COLOR_RED, \"Nincs ilyen banda!\"); return 1; } format(string, sizeof(string),\"\'%s\' Bandatagok: (id: %d)\", gangNames[gangnum], gangnum); SendClientMessage(playerid, COLOR_GREEN, string); for(new i = 0; i < gangInfo[gangnum][1]; i++) { GetPlayerName(gangMembers[gangnum], giveplayer, sizeof(giveplayer)); format(string, sizeof(string),\"%s (%d)\", giveplayer, gangMembers[gangnum]); SendClientMessage(playerid, COLOR_YELLOW, string); } return 1; } if(strcmp(cmd, \"/gangs\", true) == 0) { new x; SendClientMessage(playerid, COLOR_GREEN, \"Jelenlegi bandák:\"); for(new i=0; i < MAX_GANGS; i++) { if(gangInfo[0]==1) { format(string, sizeof(string), \"%s%s(%d) - %d tagok\", string,gangNames,i,gangInfo[1]); x++; if(x > 2) { SendClientMessage(playerid, COLOR_YELLOW, string); x = 0; format(string, sizeof(string), \"\"); } else { format(string, sizeof(string), \"%s, \", string); } } } if(x <= 2 && x > 0) { string[strlen(string)-2] = \'.\'; SendClientMessage(playerid, COLOR_YELLOW, string); } return 1; } return 0;}strtok(const string[], &index){ new length = strlen(string); while ((index < length) && (string[index] <= \' \')) { index++; } new offset = index; new result[20]; while ((index < length) && (string[index] > \' \') && ((index - offset) < (sizeof(result) - 1))) { result[index - offset] = string[index]; index++; } result[index - offset] = EOS; return result;}
#include <a_samp>#pragma tabsize 0#define COLOR_WHITE 0xFFFFFFAA#define COLOR_RED 0xAA3333AA#define COLOR_GREEN 0x33AA33AA#define COLOR_ORANGE 0xFF9900AA#define COLOR_YELLOW 0xFFFF00AA#include <IsPlayerLAdmin>#define MAX_GANGS 32#define MAX_GANG_NAME 16#define MAX_GANG_MEMBERS 6new gangNames[MAX_GANGS][MAX_GANG_NAME];new gangInfo[MAX_GANGS][3];new playerGang[MAX_PLAYERS];new gangMembers[MAX_GANGS][MAX_GANG_MEMBERS];new gangInvite[MAX_PLAYERS];new playerColors[100] = {0xFF8C13FF,0xC715FFFF,0x20B2AAFF,0xDC143CFF,0x6495EDFF,0xf0e68cFF,0x778899FF,0xFF1493FF,0xF4A460FF,0xEE82EEFF,0xFFD720FF,0x8b4513FF,0x4949A0FF,0x148b8bFF,0x14ff7fFF,0x556b2fFF,0x0FD9FAFF,0x10DC29FF,0x534081FF,0x0495CDFF,0xEF6CE8FF,0xBD34DAFF,0x247C1BFF,0x0C8E5DFF,0x635B03FF,0xCB7ED3FF,0x65ADEBFF,0x5C1ACCFF,0xF2F853FF,0x11F891FF,0x7B39AAFF,0x53EB10FF,0x54137DFF,0x275222FF,0xF09F5BFF,0x3D0A4FFF,0x22F767FF,0xD63034FF,0x9A6980FF,0xDFB935FF,0x3793FAFF,0x90239DFF,0xE9AB2FFF,0xAF2FF3FF,0x057F94FF,0xB98519FF,0x388EEAFF,0x028151FF,0xA55043FF,0x0DE018FF,0x93AB1CFF,0x95BAF0FF,0x369976FF,0x18F71FFF,0x4B8987FF,0x491B9EFF,0x829DC7FF,0xBCE635FF,0xCEA6DFFF,0x20D4ADFF,0x2D74FDFF,0x3C1C0DFF,0x12D6D4FF,0x48C000FF,0x2A51E2FF,0xE3AC12FF,0xFC42A8FF,0x2FC827FF,0x1A30BFFF,0xB740C2FF,0x42ACF5FF,0x2FD9DEFF,0xFAFB71FF,0x05D1CDFF,0xC471BDFF,0x94436EFF,0xC1F7ECFF,0xCE79EEFF,0xBD1EF2FF,0x93B7E4FF,0x3214AAFF,0x184D3BFF,0xAE4B99FF,0x7E49D7FF,0x4C436EFF,0xFA24CCFF,0xCE76BEFF,0xA04E0AFF,0x9F945CFF,0xDCDE3DFF,0x10C9C5FF,0x70524DFF,0x0BE472FF,0x8A2CD7FF,0x6152C2FF,0xCF72A9FF,0xE59338FF,0xEEDC2DFF,0xD8C762FF,0x3FE65CFF};forward PlayerLeaveGang(playerid);public OnFilterScriptInit(){ print(\"\\n--------------------------------------\"); print(\" Banda Filterscript\"); print(\"--------------------------------------\\n\"); return 1;}public OnFilterScriptExit(){ return 1;} public PlayerLeaveGang(playerid) { new string[256]; new playername[MAX_PLAYER_NAME]; new gangnum = playerGang[playerid]; if(gangnum > 0) { for(new i = 0; i < gangInfo[gangnum][1]; i++) { if(gangMembers[gangnum]==playerid) { gangInfo[gangnum][1]--; for(new j = i; j < gangInfo[gangnum][1]; j++) { gangMembers[gangnum][j]=gangMembers[gangnum][j+1]; } if(gangInfo[gangnum][1]<1) { gangInfo[gangnum][0]=0; gangInfo[gangnum][1]=0; } for(new j = 0; j < gangInfo[gangnum][1]; j++) { GetPlayerName(playerid, playername, MAX_PLAYER_NAME); format(string, sizeof(string),\"%s Kilépett a bandádból.\", playername); SendClientMessage(gangMembers[gangnum][j], COLOR_ORANGE, string); } format(string, sizeof(string),\"Kiléptél a \'%s\' nevû (id: %d) bandából.\", gangNames[gangnum], gangnum); SendClientMessage(playerid, COLOR_ORANGE, string); playerGang[playerid]=0; return; } } } else { SendClientMessage(playerid, COLOR_RED, \"Te nem vagy bandatag.\"); }} public OnPlayerCommandText(playerid,cmdtext[]){ new string[256]; new sendername[MAX_PLAYER_NAME]; new giveplayer[MAX_PLAYER_NAME]; new cmd[256]; new tmp[256]; new giveplayerid,idx; cmd = strtok(cmdtext, idx); if(strcmp(cmd, \"/banda\", true) == 0) { new gangcmd, gangnum; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, \"HASZNÁLAT: /banda [alapít/csatlakoz/kilép] [név/szám]\"); return 1; } giveplayerid = strval(tmp); if(strcmp(tmp, \"alapít\", true)==0) gangcmd = 1; else if(strcmp(tmp, \"csatlakoz\", true)==0) gangcmd = 2; else if(strcmp(tmp, \"meghív\", true)==0) gangcmd = 3; else if(strcmp(tmp, \"kilép\", true)==0) gangcmd = 4; tmp = strtok(cmdtext, idx); if(gangcmd < 4 && !strlen(tmp)) { if(gangcmd==0) SendClientMessage(playerid, COLOR_WHITE, \"HASZNÁLAT: /banda [alapít/csatlakoz/meghív/kilép] [név/szám]\"); else if(gangcmd==1) SendClientMessage(playerid, COLOR_WHITE, \"HASZNÁLAT: /banda [alapít] [név]\"); else if(gangcmd==2) SendClientMessage(playerid, COLOR_WHITE, \"HASZNÁLAT: /banda [csatlakoz] [név/szám]\"); else if(gangcmd==3) SendClientMessage(playerid, COLOR_WHITE, \"HASZNÁLAT: /banda [meghív] [JátékosID]\"); if(PlayerInfo[playerid][Level] >= 2) { for(new i = 0; i < 11; i++) SendClientMessageToAll(green,\" \"); return 1; } else return SendClientMessage(playerid,red,\"Nem vagy admin!\"); return 1; } if(gangcmd==1) { if(playerGang[playerid]>0) { SendClientMessage(playerid, COLOR_RED, \"Már bandatag vagy!\"); return 1; } for(new i = 1; i < MAX_GANGS; i++) { if(gangInfo[0]==0) { format(gangNames, MAX_GANG_NAME, \"%s\", tmp); gangInfo[0]=1; gangInfo[1]=1; gangInfo[2]=playerColors[playerid]; gangMembers[0] = playerid; format(string, sizeof(string),\"Alapítottál egy bandát \'%s\' néven. (id: %d)\", gangNames, i); SendClientMessage(playerid, COLOR_GREEN, string); playerGang[playerid]=i; return 1; } } return 1; //Join Gang// } else if (gangcmd==2) { gangnum = strval(tmp); if(gangInfo[gangnum][0]==0) { SendClientMessage(playerid, COLOR_RED, \"Ilyen banda nem létezik!\"); return 1; } if(gangInvite[playerid]!=gangnum) { SendClientMessage(playerid, COLOR_RED, \"Meg kell hívniuk hogy csatlakozhass.\"); return 1; } if(gangInfo[gangnum][1] < MAX_GANG_MEMBERS) { new i = gangInfo[gangnum][1]; gangMembers[gangnum] = playerid; GetPlayerName(playerid, sendername, MAX_PLAYER_NAME); for(new j = 0; j < gangInfo[gangnum][1]; j++) { format(string, sizeof(string),\"%s has joined your gang.\", sendername); SendClientMessage(gangMembers[gangnum][j], COLOR_ORANGE, string); } gangInfo[gangnum][1]++; playerGang[playerid] = gangnum; SetPlayerColor(playerid,gangInfo[gangnum][2]); format(string, sizeof(string),\"Beléptél \'%s\' nevû (id: %d) bandába.\", gangNames[gangnum], gangnum); SendClientMessage(playerid, COLOR_GREEN, string); return 1; }// } SendClientMessage(playerid, COLOR_RED, \"A banda megtelt.\"); return 1; } else if (gangcmd==3) { giveplayerid = strval(tmp); if(playerGang[playerid]==0) { SendClientMessage(playerid, COLOR_RED, \"Nem vagy bandatag!\"); return 1; } if(IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string),\"Meghívott egy banda, a neve: %s.\", giveplayer); SendClientMessage(playerid, COLOR_GREEN, string); format(string, sizeof(string),\"Meghívott egy banda %s-ból \'%s\'-ba/be (id: %d)\", sendername, gangNames[playerGang[playerid]],playerGang[playerid]); SendClientMessage(giveplayerid, COLOR_GREEN, string); gangInvite[giveplayerid]=playerGang[playerid]; } else SendClientMessage(playerid, COLOR_RED, \"Nincs ilyen játékos\"); } else if (gangcmd==4) { PlayerLeaveGang(playerid); } return 1; } if(strcmp(cmd, \"/bandainfo\", true) == 0) { new gangnum; tmp = strtok(cmdtext, idx); if(!strlen(tmp) && playerGang[playerid]==0) { SendClientMessage(playerid, COLOR_WHITE, \"HASZNÁLAT: /bandainfo [szám]\"); return 1; } else if (!strlen(tmp)) gangnum = playerGang[playerid]; else gangnum = strval(tmp); if(gangInfo[gangnum][0]==0) { SendClientMessage(playerid, COLOR_RED, \"Nincs ilyen banda!\"); return 1; } format(string, sizeof(string),\"\'%s\' Bandatagok: (id: %d)\", gangNames[gangnum], gangnum); SendClientMessage(playerid, COLOR_GREEN, string); for(new i = 0; i < gangInfo[gangnum][1]; i++) { GetPlayerName(gangMembers[gangnum], giveplayer, sizeof(giveplayer)); format(string, sizeof(string),\"%s (%d)\", giveplayer, gangMembers[gangnum]); SendClientMessage(playerid, COLOR_YELLOW, string); } return 1; } if(strcmp(cmd, \"/gangs\", true) == 0) { new x; SendClientMessage(playerid, COLOR_GREEN, \"Jelenlegi bandák:\"); for(new i=0; i < MAX_GANGS; i++) { if(gangInfo[0]==1) { format(string, sizeof(string), \"%s%s(%d) - %d tagok\", string,gangNames,i,gangInfo[1]); x++; if(x > 2) { SendClientMessage(playerid, COLOR_YELLOW, string); x = 0; format(string, sizeof(string), \"\"); } else { format(string, sizeof(string), \"%s, \", string); } } } if(x <= 2 && x > 0) { string[strlen(string)-2] = \'.\'; SendClientMessage(playerid, COLOR_YELLOW, string); } return 1; } return 0;}strtok(const string[], &index){ new length = strlen(string); while ((index < length) && (string[index] <= \' \')) { index++; } new offset = index; new result[20]; while ((index < length) && (string[index] > \' \') && ((index - offset) < (sizeof(result) - 1))) { result[index - offset] = string[index]; index++; } result[index - offset] = EOS; return result;}
#include <a_samp>#pragma tabsize 0#define COLOR_WHITE 0xFFFFFFAA#define COLOR_RED 0xAA3333AA#define COLOR_GREEN 0x33AA33AA#define COLOR_ORANGE 0xFF9900AA#define COLOR_YELLOW 0xFFFF00AA#define MAX_GANGS 32#define MAX_GANG_NAME 16#define MAX_GANG_MEMBERS 6#include <IsPlayerLAdmin>new gangNames[MAX_GANGS][MAX_GANG_NAME];new gangInfo[MAX_GANGS][3];new playerGang[MAX_PLAYERS];new gangMembers[MAX_GANGS][MAX_GANG_MEMBERS];new gangInvite[MAX_PLAYERS];new playerColors[100] = {0xFF8C13FF,0xC715FFFF,0x20B2AAFF,0xDC143CFF,0x6495EDFF,0xf0e68cFF,0x778899FF,0xFF1493FF,0xF4A460FF,0xEE82EEFF,0xFFD720FF,0x8b4513FF,0x4949A0FF,0x148b8bFF,0x14ff7fFF,0x556b2fFF,0x0FD9FAFF,0x10DC29FF,0x534081FF,0x0495CDFF,0xEF6CE8FF,0xBD34DAFF,0x247C1BFF,0x0C8E5DFF,0x635B03FF,0xCB7ED3FF,0x65ADEBFF,0x5C1ACCFF,0xF2F853FF,0x11F891FF,0x7B39AAFF,0x53EB10FF,0x54137DFF,0x275222FF,0xF09F5BFF,0x3D0A4FFF,0x22F767FF,0xD63034FF,0x9A6980FF,0xDFB935FF,0x3793FAFF,0x90239DFF,0xE9AB2FFF,0xAF2FF3FF,0x057F94FF,0xB98519FF,0x388EEAFF,0x028151FF,0xA55043FF,0x0DE018FF,0x93AB1CFF,0x95BAF0FF,0x369976FF,0x18F71FFF,0x4B8987FF,0x491B9EFF,0x829DC7FF,0xBCE635FF,0xCEA6DFFF,0x20D4ADFF,0x2D74FDFF,0x3C1C0DFF,0x12D6D4FF,0x48C000FF,0x2A51E2FF,0xE3AC12FF,0xFC42A8FF,0x2FC827FF,0x1A30BFFF,0xB740C2FF,0x42ACF5FF,0x2FD9DEFF,0xFAFB71FF,0x05D1CDFF,0xC471BDFF,0x94436EFF,0xC1F7ECFF,0xCE79EEFF,0xBD1EF2FF,0x93B7E4FF,0x3214AAFF,0x184D3BFF,0xAE4B99FF,0x7E49D7FF,0x4C436EFF,0xFA24CCFF,0xCE76BEFF,0xA04E0AFF,0x9F945CFF,0xDCDE3DFF,0x10C9C5FF,0x70524DFF,0x0BE472FF,0x8A2CD7FF,0x6152C2FF,0xCF72A9FF,0xE59338FF,0xEEDC2DFF,0xD8C762FF,0x3FE65CFF};forward PlayerLeaveGang(playerid);public OnFilterScriptInit(){ print(\"\\n--------------------------------------\"); print(\" Banda Filterscript\"); print(\"--------------------------------------\\n\"); return 1;}public OnFilterScriptExit(){ return 1;} public PlayerLeaveGang(playerid) { new string[256]; new playername[MAX_PLAYER_NAME]; new gangnum = playerGang[playerid]; if(gangnum > 0) { for(new i = 0; i < gangInfo[gangnum][1]; i++) { if(gangMembers[gangnum]==playerid) { gangInfo[gangnum][1]--; for(new j = i; j < gangInfo[gangnum][1]; j++) { gangMembers[gangnum][j]=gangMembers[gangnum][j+1]; } if(gangInfo[gangnum][1]<1) { gangInfo[gangnum][0]=0; gangInfo[gangnum][1]=0; } for(new j = 0; j < gangInfo[gangnum][1]; j++) { GetPlayerName(playerid, playername, MAX_PLAYER_NAME); format(string, sizeof(string),\"%s Kilépett a bandádból.\", playername); SendClientMessage(gangMembers[gangnum][j], COLOR_ORANGE, string); } format(string, sizeof(string),\"Kiléptél a \'%s\' nevû (id: %d) bandából.\", gangNames[gangnum], gangnum); SendClientMessage(playerid, COLOR_ORANGE, string); playerGang[playerid]=0; return; } } } else { SendClientMessage(playerid, COLOR_RED, \"Te nem vagy bandatag.\"); }} public OnPlayerCommandText(playerid,cmdtext[]){ new string[256]; new sendername[MAX_PLAYER_NAME]; new giveplayer[MAX_PLAYER_NAME]; new cmd[256]; new tmp[256]; new giveplayerid,idx; cmd = strtok(cmdtext, idx); if(strcmp(cmd, \"/banda\", true) == 0) { new gangcmd, gangnum; tmp = strtok(cmdtext, idx); if (IsPlayerAdminLevel(playerid, 4)) if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, \"HASZNÁLAT: /banda [alapít/csatlakoz/kilép] [név/szám]\"); return 1; } giveplayerid = strval(tmp); if(strcmp(tmp, \"alapít\", true)==0) gangcmd = 1; else if(strcmp(tmp, \"csatlakoz\", true)==0) gangcmd = 2; else if(strcmp(tmp, \"meghív\", true)==0) gangcmd = 3; else if(strcmp(tmp, \"kilép\", true)==0) gangcmd = 4; tmp = strtok(cmdtext, idx); if(gangcmd < 4 && !strlen(tmp)) { if(gangcmd==0) SendClientMessage(playerid, COLOR_WHITE, \"HASZNÁLAT: /banda [alapít/csatlakoz/meghív/kilép] [név/szám]\"); else if(gangcmd==1) SendClientMessage(playerid, COLOR_WHITE, \"HASZNÁLAT: /banda [alapít] [név]\"); else if(gangcmd==2) SendClientMessage(playerid, COLOR_WHITE, \"HASZNÁLAT: /banda [csatlakoz] [név/szám]\"); else if(gangcmd==3) SendClientMessage(playerid, COLOR_WHITE, \"HASZNÁLAT: /banda [meghív] [JátékosID]\"); return 1; } if(gangcmd==1) { if(playerGang[playerid]>0) { SendClientMessage(playerid, COLOR_RED, \"Már bandatag vagy!\"); return 1; } for(new i = 1; i < MAX_GANGS; i++) { if(gangInfo[0]==0) { format(gangNames, MAX_GANG_NAME, \"%s\", tmp); gangInfo[0]=1; gangInfo[1]=1; gangInfo[2]=playerColors[playerid]; gangMembers[0] = playerid; format(string, sizeof(string),\"Alapítottál egy bandát \'%s\' néven. (id: %d)\", gangNames, i); SendClientMessage(playerid, COLOR_GREEN, string); playerGang[playerid]=i; return 1; } } return 1; //Join Gang// } else if (gangcmd==2) { gangnum = strval(tmp); if(gangInfo[gangnum][0]==0) { SendClientMessage(playerid, COLOR_RED, \"Ilyen banda nem létezik!\"); return 1; } if(gangInvite[playerid]!=gangnum) { SendClientMessage(playerid, COLOR_RED, \"Meg kell hívniuk hogy csatlakozhass.\"); return 1; } if(gangInfo[gangnum][1] < MAX_GANG_MEMBERS) { new i = gangInfo[gangnum][1]; gangMembers[gangnum] = playerid; GetPlayerName(playerid, sendername, MAX_PLAYER_NAME); for(new j = 0; j < gangInfo[gangnum][1]; j++) { format(string, sizeof(string),\"%s has joined your gang.\", sendername); SendClientMessage(gangMembers[gangnum][j], COLOR_ORANGE, string); } gangInfo[gangnum][1]++; playerGang[playerid] = gangnum; SetPlayerColor(playerid,gangInfo[gangnum][2]); format(string, sizeof(string),\"Beléptél \'%s\' nevû (id: %d) bandába.\", gangNames[gangnum], gangnum); SendClientMessage(playerid, COLOR_GREEN, string); return 1; }// } SendClientMessage(playerid, COLOR_RED, \"A banda megtelt.\"); return 1; } else if (gangcmd==3) { giveplayerid = strval(tmp); if(playerGang[playerid]==0) { SendClientMessage(playerid, COLOR_RED, \"Nem vagy bandatag!\"); return 1; } if(IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string),\"Meghívott egy banda, a neve: %s.\", giveplayer); SendClientMessage(playerid, COLOR_GREEN, string); format(string, sizeof(string),\"Meghívott egy banda %s-ból \'%s\'-ba/be (id: %d)\", sendername, gangNames[playerGang[playerid]],playerGang[playerid]); SendClientMessage(giveplayerid, COLOR_GREEN, string); gangInvite[giveplayerid]=playerGang[playerid]; } else SendClientMessage(playerid, COLOR_RED, \"Nincs ilyen játékos\"); } else if (gangcmd==4) { PlayerLeaveGang(playerid); } return 1; } if(strcmp(cmd, \"/bandainfo\", true) == 0) { new gangnum; tmp = strtok(cmdtext, idx); if(!strlen(tmp) && playerGang[playerid]==0) { SendClientMessage(playerid, COLOR_WHITE, \"HASZNÁLAT: /bandainfo [szám]\"); return 1; } else if (!strlen(tmp)) gangnum = playerGang[playerid]; else gangnum = strval(tmp); if(gangInfo[gangnum][0]==0) { SendClientMessage(playerid, COLOR_RED, \"Nincs ilyen banda!\"); return 1; } format(string, sizeof(string),\"\'%s\' Bandatagok: (id: %d)\", gangNames[gangnum], gangnum); SendClientMessage(playerid, COLOR_GREEN, string); for(new i = 0; i < gangInfo[gangnum][1]; i++) { GetPlayerName(gangMembers[gangnum], giveplayer, sizeof(giveplayer)); format(string, sizeof(string),\"%s (%d)\", giveplayer, gangMembers[gangnum]); SendClientMessage(playerid, COLOR_YELLOW, string); } return 1; } if(strcmp(cmd, \"/gangs\", true) == 0) { new x; SendClientMessage(playerid, COLOR_GREEN, \"Jelenlegi bandák:\"); for(new i=0; i < MAX_GANGS; i++) { if(gangInfo[0]==1) { format(string, sizeof(string), \"%s%s(%d) - %d tagok\", string,gangNames,i,gangInfo[1]); x++; if(x > 2) { SendClientMessage(playerid, COLOR_YELLOW, string); x = 0; format(string, sizeof(string), \"\"); } else { format(string, sizeof(string), \"%s, \", string); } } } if(x <= 2 && x > 0) { string[strlen(string)-2] = \'.\'; SendClientMessage(playerid, COLOR_YELLOW, string); } return 1; } return 0;}