Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Include //
- #include < a_samp >
- #include < YSI\y_ini >
- #include < YSI\y_commands >
- #include < sscanf2 >
- // Define //
- #define col_srvboja "{0057AE}"
- #define col_white "{FFFFFF}"
- #undef MAX_PLAYERS
- #define MAX_PLAYERS 50
- #define MAX_CLANOVI 30 // Podesite
- #define MAX_ORGS 30
- #define MAX_ORGVEHS 100
- #define MAX_ORGGATES 60
- #define ORG_FILE "/Organizacije/%d.ini"
- #define ORGVEH_FILE "/OrgVozila/%d.ini"
- #define ORGGATES_FILE "/OrgKapije/%d.ini"
- #define SCM SendClientMessage
- #define SPD ShowPlayerDialog
- // Dialozi //
- enum {
- DIALOG_ORGCREATE,
- DIALOG_ORGCREATE2,
- DIALOG_ORGCREATE8,
- DIALOG_ORGCREATE3,
- DIALOG_ORGCREATE4,
- DIALOG_ORGCREATE5,
- DIALOG_ORGCREATE7,
- DIALOG_ORGCREATE6,
- DIALOG_ORGCREATE9,
- DIALOG_RANK2,
- DIALOG_RANK3,
- DIALOG_RANK4,
- DIALOG_RANK5,
- DIALOG_ZONACREATE,
- DIALOG_ORGINV,
- DIALOG_ORGCMD,
- DIALOG_LIDERCMD,
- DIALOG_CLANOVI,
- DIALOG_UBACICLANA,
- DIALOG_IZBACICLANA,
- DIALOG_IZBACICLANAOFF,
- DIALOG_DODELIRANK,
- DIALOG_SAVEZ,
- DIALOG_ORGSEF,
- DIALOG_OSTAVINOVAC,
- DIALOG_OSTAVIDROGU,
- DIALOG_OSTAVIMATS,
- DIALOG_UZMINOVAC,
- DIALOG_UZMIMATS,
- DIALOG_UZMIDROGU,
- DIALOG_LIDERSEF,
- DIALOG_UZMIOPREMU,
- DIALOG_SEFINF
- }
- // Enum //
- enum ORG_INFO {
- bool:orgLiderSlot1,
- bool:orgLiderSlot2,
- Float:orgPosX,
- Float:orgPosY,
- Float:orgPosZ,
- Float:orgSefX,
- Float:orgSefY,
- Float:orgSefZ,
- Float:orgSefRX,
- Float:orgSefRY,
- Float:orgSefRZ,
- orgSefNovac,
- orgSefMats,
- orgSefDroga,
- orgSefID,
- orgSefObjID,
- Text3D:orgSefLabel,
- Float:orgPDDutyX,
- Float:orgPDDutyY,
- Float:orgPDDutyZ,
- Text3D:orgPDDutyLabel,
- orgPDDutyPickup,
- Float:orgGunX,
- Float:orgGunY,
- Float:orgGunZ,
- Text3D:orgGunLabel,
- orgGunPickup,
- Float:orgHapsenjeX,
- Float:orgHapsenjeY,
- Float:orgHapsenjeZ,
- Text3D:orgHapsenjeLabel,
- orgHapsenjePickup,
- orgBoja,
- zBoja,
- orgIme[ 30 ],
- orgSkracenica[ 5 ],
- orgRank1[ 24 ],
- orgRank2[ 24 ],
- orgRank3[ 24 ],
- orgRank4[ 24 ],
- orgRank5[ 24 ],
- orgSkin1,
- orgSkin2,
- orgSkin3,
- orgSkin4,
- orgSkin5,
- orgZSkin1,
- orgZSkin2,
- orgZSkin3,
- orgZSkin4,
- orgZSkin5,
- Float:zMinX,
- Float:zMinY,
- Float:zMaxX,
- Float:zMaxY,
- Float:pPosX,
- Float:pPosY,
- Float:pPosZ,
- Float:intPosX,
- Float:intPosY,
- Float:intPosZ,
- orgZauzeta,
- orgUSavezu,
- bool:orgMafija,
- bool:orgBanda,
- bool:orgDrzavna,
- orgClan1[ MAX_PLAYER_NAME ],
- orgClan2[ MAX_PLAYER_NAME ],
- orgClan3[ MAX_PLAYER_NAME ],
- orgClan4[ MAX_PLAYER_NAME ],
- orgClan5[ MAX_PLAYER_NAME ],
- orgClan6[ MAX_PLAYER_NAME ],
- orgClan7[ MAX_PLAYER_NAME ],
- orgClan8[ MAX_PLAYER_NAME ],
- orgClan9[ MAX_PLAYER_NAME ],
- orgClan10[ MAX_PLAYER_NAME ],
- orgClan11[ MAX_PLAYER_NAME ],
- orgClan12[ MAX_PLAYER_NAME ],
- orgClan13[ MAX_PLAYER_NAME ],
- orgClan14[ MAX_PLAYER_NAME ],
- orgClan15[ MAX_PLAYER_NAME ],
- orgClan16[ MAX_PLAYER_NAME ],
- orgClan17[ MAX_PLAYER_NAME ],
- orgClan18[ MAX_PLAYER_NAME ],
- orgClan19[ MAX_PLAYER_NAME ],
- orgClan20[ MAX_PLAYER_NAME ],
- orgClan21[ MAX_PLAYER_NAME ],
- orgClan22[ MAX_PLAYER_NAME ],
- orgClan23[ MAX_PLAYER_NAME ],
- orgClan24[ MAX_PLAYER_NAME ],
- orgClan25[ MAX_PLAYER_NAME ],
- orgClan26[ MAX_PLAYER_NAME ],
- orgClan27[ MAX_PLAYER_NAME ],
- orgClan28[ MAX_PLAYER_NAME ],
- orgClan29[ MAX_PLAYER_NAME ],
- orgClan30[ MAX_PLAYER_NAME ],
- orgLider1[ MAX_PLAYER_NAME ],
- orgLider2[ MAX_PLAYER_NAME ],
- orgClanovi,
- orgInt,
- orgVW,
- zID,
- oID,
- pID
- }
- enum ORGVEH_INFO {
- Float:ovPosX,
- Float:ovPosY,
- Float:ovPosZ,
- Float:ovRotA,
- ovBoja1,
- ovBoja2,
- ovModel,
- ovOrgID,
- ovID
- }
- enum ORGGATE_INFO {
- Float:ogPosX,
- Float:ogPosY,
- Float:ogPosZ,
- Float:ogRotX,
- Float:ogRotY,
- Float:ogRotZ,
- Float:oogPosX,
- Float:oogPosY,
- Float:oogPosZ,
- Float:oogRotX,
- Float:oogRotY,
- Float:oogRotZ,
- ogOrgID,
- ogBrzinaZ,
- ogVremeZ,
- ogObjID,
- ogID,
- bool:ogOtvorena
- }
- // New //
- new OrgInfo[ MAX_ORGS ][ ORG_INFO ], Text3D:OrgLabel[ sizeof(OrgInfo) ], Text3D:ZauzimanjeLabel[ sizeof(OrgInfo) ], KreiraOrg[ MAX_PLAYERS ], KreiraZonu[ MAX_PLAYERS ], bool:KreiraPickup[ MAX_PLAYERS ], PoslaoSavez[ MAX_PLAYERS ];
- new pClan[ MAX_PLAYERS ], pRank[ MAX_PLAYERS ], pLider[ MAX_PLAYERS ], bool:pUlogovan[ MAX_PLAYERS ], pZensko[ MAX_PLAYERS ], pWanted[ MAX_PLAYERS ], pZatvorVreme[ MAX_PLAYERS ]; // Dodati u PlayerInfo
- new oPozvan[ MAX_PLAYERS ], ZauzimanjeTimer[ MAX_PLAYERS ], Zauzima[ MAX_PLAYERS ], KapijaTimer[ MAX_ORGGATES ], bool:LociraOrgHangar[ MAX_PLAYERS ], bool:CekaSavez[ MAX_PLAYERS ], KreiraSef[ MAX_PLAYERS ];
- new OrgVehInfo[ MAX_ORGVEHS ][ ORGVEH_INFO ], Text3D:OrgVehLabel[ sizeof(OrgVehInfo) ], OrgGateInfo[ MAX_ORGGATES ][ ORGGATE_INFO ], KreiraKapiju[ MAX_PLAYERS ], bool:KreiraZatvorenu[ MAX_PLAYERS ], TipVozila[ MAX_VEHICLES ];
- new bool:PoliceDuty[ MAX_PLAYERS ], StariSkin[ MAX_PLAYERS ], bool:UzeoOpremu[ MAX_PLAYERS ], ZatvorTimer[ MAX_PLAYERS ];
- // Publics //
- public OnPlayerEnterCheckpoint(playerid) {
- if(LociraOrgHangar[ playerid ]) { DisablePlayerCheckpoint(playerid); LociraOrgHangar[ playerid ] = false; }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {
- switch(dialogid) {
- case DIALOG_ORGCREATE: {
- if(response) {
- new ime[ 30 ], i = NextORGID(MAX_ORGS);
- if(sscanf(inputtext, "s[30]", ime)) return SPD(playerid, DIALOG_ORGCREATE, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ime organizacije.\nMax 30 slova.","Dalje","Izlaz");
- KreiraOrg[ playerid ] = i;
- OrgInfo[ i ][ orgIme ] = ime;
- SPD(playerid, DIALOG_ORGCREATE2, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite skracenicu organizacije.\nPrimer - GSF","Dalje","Izlaz");
- }
- }
- case DIALOG_ORGCREATE2: {
- if(response) {
- new skracenica[ 5 ], i = KreiraOrg[ playerid ];
- if(sscanf(inputtext, "s[5]", skracenica)) return SPD(playerid, DIALOG_ORGCREATE2, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite skracenicu organizacije.\nPrimer - GSF","Dalje","Izlaz");
- OrgInfo[ i ][ orgSkracenica ] = skracenica;
- SPD(playerid, DIALOG_ORGCREATE8, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite vrstu organizacije.\n1 - Banda\n2 - Mafija\n3 - Drzavna","Dalje","Izlaz");
- }
- }
- case DIALOG_ORGCREATE8: {
- if(response) {
- new vrsta, i = KreiraOrg[ playerid ];
- if(sscanf(inputtext, "d", vrsta)) return SPD(playerid, DIALOG_ORGCREATE8, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite vrstu organizacije.\n1 - Banda\n2 - Mafija\n3 - Drzavna","Dalje","Izlaz");
- if(vrsta == 1) { OrgInfo[ i ][ orgBanda ] = true; }
- else if(vrsta == 2) { OrgInfo[ i ][ orgMafija ] = true; }
- else if(vrsta == 3) { OrgInfo[ i ][ orgDrzavna ] = true; }
- SPD(playerid, DIALOG_ORGCREATE3, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite HEX Boju organizacije.\nPrimer: 0xFFFFFFFF","Dalje","Izlaz");
- }
- }
- case DIALOG_ORGCREATE3: {
- if(response) {
- new hex, i = KreiraOrg[ playerid ];
- if(sscanf(inputtext, "h", hex)) return SPD(playerid, DIALOG_ORGCREATE3, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite HEX Boju organizacije.\nPrimer: 0xFFFFFFFF","Dalje","Izlaz");
- OrgInfo[ i ][ orgBoja ] = hex;
- SPD(playerid, DIALOG_ORGCREATE4, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ime 1. ranka.\nPrimer: Recruit.","Dalje","Izlaz");
- }
- }
- case DIALOG_ORGCREATE4: {
- if(response) {
- new r1[ 24 ], i = KreiraOrg[ playerid ];
- if(sscanf(inputtext, "s[24]", r1)) return SPD(playerid, DIALOG_ORGCREATE4, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ime 1. ranka.\nPrimer: Kadet.","Dalje","Izlaz");
- OrgInfo[ i ][ orgRank1 ] = r1;
- SPD(playerid, DIALOG_RANK2, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ime 2. ranka.\nPrimer: Corporal.","Dalje","Izlaz");
- }
- }
- case DIALOG_RANK2: {
- if(response) {
- new r1[ 24 ], i = KreiraOrg[ playerid ];
- if(sscanf(inputtext, "s[24]", r1)) return SPD(playerid, DIALOG_RANK2, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ime 2. ranka.\nPrimer: Corporal.","Dalje","Izlaz");
- OrgInfo[ i ][ orgRank2 ] = r1;
- SPD(playerid, DIALOG_RANK3, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ime 3. ranka.\nPrimer: Sergenant.","Dalje","Izlaz");
- }
- }
- case DIALOG_RANK3: {
- if(response) {
- new r1[ 24 ], i = KreiraOrg[ playerid ];
- if(sscanf(inputtext, "s[24]", r1)) return SPD(playerid, DIALOG_RANK3, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ime 3. ranka.\nPrimer: Sergenant.","Dalje","Izlaz");
- OrgInfo[ i ][ orgRank3 ] = r1;
- SPD(playerid, DIALOG_RANK4, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ime 4. ranka (podlider).\nPrimer: Assistant of Cheif.","Dalje","Izlaz");
- }
- }
- case DIALOG_RANK4: {
- if(response) {
- new r1[ 24 ], i = KreiraOrg[ playerid ];
- if(sscanf(inputtext, "s[24]", r1)) return SPD(playerid, DIALOG_RANK4, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ime 4. ranka (podlider).\nPrimer: Assistant of Cheif.","Dalje","Izlaz");
- OrgInfo[ i ][ orgRank4 ] = r1;
- SPD(playerid, DIALOG_RANK5, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ime 5. ranka (lider).\nPrimer: Cheif.","Dalje","Izlaz");
- }
- }
- case DIALOG_RANK5: {
- if(response) {
- new r1[ 24 ], i = KreiraOrg[ playerid ];
- if(sscanf(inputtext, "s[24]", r1)) return SPD(playerid, DIALOG_RANK5, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ime 5. ranka (lider).\nPrimer: Cheif.","Dalje","Izlaz");
- OrgInfo[ i ][ orgRank5 ] = r1;
- SPD(playerid, DIALOG_ORGCREATE6, DIALOG_STYLE_INPUT, "ORG Kreiranje", "Upisite IDove 5 muskih skinova.","Dalje","Izlaz");
- }
- }
- case DIALOG_ORGCREATE6: {
- if(response) {
- new s1, s2, s3, s4, s5, i = KreiraOrg[ playerid ];
- if(sscanf(inputtext, "ddddd", s1, s2, s3, s4, s5)) return SPD(playerid, DIALOG_ORGCREATE6, DIALOG_STYLE_INPUT, "ORG Kreiranje", "Upisite IDove 5 muskih skinova.","Dalje","Izlaz");
- OrgInfo[ i ][ orgSkin1 ] = s1; OrgInfo[ i ][ orgSkin2 ] = s2; OrgInfo[ i ][ orgSkin3 ] = s3; OrgInfo[ i ][ orgSkin4 ] = s4; OrgInfo[ i ][ orgSkin5 ] = s5;
- SPD(playerid, DIALOG_ORGCREATE9, DIALOG_STYLE_INPUT, "ORG Kreiranje", "Upisite IDove 5 zenskih skinova.","Dalje","Izlaz");
- }
- }
- case DIALOG_ORGCREATE9: {
- if(response) {
- new s1, s2, s3, s4, s5, i = KreiraOrg[ playerid ];
- if(sscanf(inputtext, "ddddd", s1, s2, s3, s4, s5)) return SPD(playerid, DIALOG_ORGCREATE6, DIALOG_STYLE_INPUT, "ORG Kreiranje", "Upisite IDove 5 zenskih skinova.","Dalje","Izlaz");
- OrgInfo[ i ][ orgZSkin1 ] = s1; OrgInfo[ i ][ orgZSkin2 ] = s2; OrgInfo[ i ][ orgZSkin3 ] = s3; OrgInfo[ i ][ orgZSkin4 ] = s4; OrgInfo[ i ][ orgZSkin5 ] = s5;
- SPD(playerid, DIALOG_ORGCREATE5, DIALOG_STYLE_INPUT, "ORG Kreiranje", "Upisite kordinate enterijera organizacije.","Dalje","Izlaz");
- }
- }
- case DIALOG_ORGCREATE5: {
- if(response) {
- new Float:iX, Float:iY, Float:iZ, i = KreiraOrg[ playerid ];
- if(sscanf(inputtext, "fff", iX, iY, iZ)) return SPD(playerid, DIALOG_ORGCREATE5, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite kordinate enterijera organizacije.","Dalje","Izlaz");
- OrgInfo[ i ][ intPosX ] = iX;
- OrgInfo[ i ][ intPosY ] = iY;
- OrgInfo[ i ][ intPosZ ] = iZ;
- SPD(playerid, DIALOG_ORGCREATE7, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ID enterijera pa ID Virtual Worlda.","Dalje","Izlaz");
- }
- }
- case DIALOG_ORGCREATE7: {
- if(response) {
- new int, vw, i = KreiraOrg[ playerid ];
- if(sscanf(inputtext, "dd", int, vw)) return SPD(playerid, DIALOG_ORGCREATE7, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ID enterijera pa ID Virtual Worlda.","Dalje","Izlaz");
- OrgInfo[ i ][ orgInt ] = int;
- OrgInfo[ i ][ orgVW ] = vw;
- new Float:X, Float:Y, Float:Z, str[ 256 ];
- GetPlayerPos(playerid, X,Y,Z);
- SendClientMessage(playerid, -1, "Ukoliko zelite da kreirate zonu i zauzimanje - /kreirajzonu");
- OrgInfo[ i ][ oID ] = CreatePickup(1314, 1, X,Y,Z, 0);
- format( str, sizeof( str ),""col_srvboja"~ "col_white"%s"col_srvboja" ~\n "col_white"ID: "col_srvboja"%d \n "col_white"Br.Clanova:"col_srvboja" %d\n"col_white"Lider 1: "col_srvboja"Niko\n"col_white"Lider 2: "col_srvboja"Niko\n{FFFFFF}Za ulaz pritisnite - "col_srvboja"ENTER", OrgInfo[ i ][ orgIme ],i,OrgInfo[ i ][ orgClanovi ]);
- OrgLabel[ i ] = Create3DTextLabel(str, OrgInfo[ i ][ orgBoja ], X,Y,Z, 15.0, 0,0);
- OrgInfo[ i ][ orgPosX ] = X;
- OrgInfo[ i ][ orgPosY ] = Y;
- OrgInfo[ i ][ orgPosZ ] = Z;
- strmid( OrgInfo[ i ][ orgLider1 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgLider2 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan1 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan2 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan3 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan4 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan5 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan6 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan7 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan8 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan9 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan10 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan11 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan12 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan13 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan14 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan15 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan16 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan17 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan18 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan19 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan20 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan21 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan22 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan23 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan24 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan25 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan26 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan27 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan28 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan29 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
- strmid( OrgInfo[ i ][ orgClan30 ], "Niko", 0, strlen("Niko" ), MAX_PLAYER_NAME );
- SaveOrg(i);
- KreiraOrg[ playerid ] = 0;
- }
- }
- case DIALOG_ZONACREATE: {
- if(response) {
- new hex;
- if(sscanf(inputtext, "h", hex)) return SPD(playerid, DIALOG_ZONACREATE, DIALOG_STYLE_INPUT, "Zona Kreiranje","Upisite HEX Boju zone.","U redu","Izlaz");
- GangZoneShowForAll(OrgInfo[ KreiraZonu[ playerid ] ][ zID ], hex);
- KreiraPickup[ playerid ] = true;
- OrgInfo[ KreiraZonu[ playerid ] ][ zBoja ] = hex;
- SCM(playerid, -1, "Sada sacuvajte poziciju pickupa za zauzimanje dugmetom Y.");
- }
- }
- case DIALOG_ORGINV: {
- if(response) {
- new i = oPozvan[ playerid ], pname[ MAX_PLAYER_NAME ];
- GetPlayerName(playerid, pname, sizeof(pname));
- OrgInfo[ i ][ orgClanovi ]++;
- if(!OrgInfo[ i ][ orgDrzavna ]) { SetPlayerSkin(playerid, OrgInfo[ i ][ orgSkin1 ]); }
- if( !strcmp( OrgInfo[ i ][ orgClan1 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan1 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan2 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan2 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan3 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan3 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan4 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan4 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan5 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan5 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan6 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan6 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan7 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan7 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan8 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan8 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan9 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan9 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan10 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan10 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan11 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan11 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan12 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan12 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan13 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan13 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan14 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan14 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan15 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan15 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan16 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan16 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan17 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan17 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan18 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan18 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan19 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan19 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan20 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan20 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan21 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan21 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan22 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan22 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan23 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan23 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan24 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan24 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan25 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan25 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan26 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan26 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan27 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan27 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan28 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan28 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan29 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan29 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ i ][ orgClan30 ], "Niko", true ) ) { strmid( OrgInfo[ i ][ orgClan30 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); }
- pClan[ playerid ] = i;
- SaveOrg(i);
- for(new p; p < MAX_PLAYERS; p++) {
- if(pClan[ p ] == i) { new str[ 60 ]; format(str, sizeof(str), "Igrac %s je prihvatio poziv i pridruzio se organizaciji.", pname); SCM(p, -1, str); }
- }
- oPozvan[ playerid ] = 0;
- }
- else {
- new i = oPozvan[ playerid ], pname[ MAX_PLAYER_NAME ];
- GetPlayerName(playerid, pname, sizeof(pname));
- for(new p; p < MAX_PLAYERS; p++) {
- if(pClan[ p ] == i) { new str[ 60 ]; format(str, sizeof(str), "Igrac %s je odbio poziv za organizaciju.", pname); SCM(p, -1, str); }
- }
- oPozvan[ playerid ] = 0;
- }
- }
- case DIALOG_ORGCMD: {
- if(!response) return 0;
- switch(listitem) {
- case 0: {
- SetPlayerCheckpoint(playerid, OrgInfo[ pClan[ playerid ] ][ orgPosX ], OrgInfo[ pClan[ playerid ] ][ orgPosY ], OrgInfo[ pClan[ playerid ] ][ orgPosZ ], 3.0);
- SendClientMessage(playerid, -1, "Organizacija oznacena crveno na mapi.");
- LociraOrgHangar[ playerid ] = true;
- }
- case 1: {
- // HANGAR KOORDINATE TRAXX GEJ SetPlayerCheckpoint(playerid, OrgInfo[ pClan[ playerid ] ][ orgPosX ], OrgInfo[ pClan[ playerid ] ][ orgPosY ], OrgInfo[ pClan[ playerid ] ][ orgPosZ ], 3.0);
- SendClientMessage(playerid, -1, "Hangar oznacen crveno na mapi.");
- LociraOrgHangar[ playerid ] = true;
- }
- case 2: {
- new DialogStrgEx[ 2048 ];
- strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ));
- format( DialogStrgEx, sizeof( DialogStrgEx ), "Lider 1: %s\nLider 2: %s\nClan 1: %s\nClan 2: %s\nClan 3: %s\nClan 4: %s\nClan 5: %s\nClan 6: %s\nClan 7: %s\nClan 8: %s\nClan 9: %s\nClan 10: %s\nClan 11: %s\nClan 12: %s\nClan 13: %s\nClan 14: %s\nClan 15: %s\nClan 16: %s\nClan 17: %s\nClan 18: %s\nClan 19: %s\nClan 20: %s\nClan 21: %s\nClan 22: %s\nClan 23: %s\nClan 24: %s\nClan 25: %s\nClan 26: %s\nClan 27: %s\nClan 28: %s\nClan 29: %s\nClan 30: %s" ,
- OrgInfo[ pClan[ playerid ] ][ orgLider1 ],
- OrgInfo[ pClan[ playerid ] ][ orgLider2 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan1 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan2 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan3 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan4 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan5 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan6 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan7 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan8 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan9 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan10 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan11 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan12 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan13 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan14 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan15 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan16 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan17 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan18 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan19 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan20 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan21 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan22 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan23 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan24 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan25 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan26 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan27 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan28 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan29 ],
- OrgInfo[ pClan[ playerid ] ][ orgClan30 ] );
- ShowPlayerDialog( playerid, DIALOG_CLANOVI, DIALOG_STYLE_MSGBOX, "CLANOVI", DialogStrgEx, "U redu", "" );
- strdel( DialogStrgEx, 0, sizeof( DialogStrgEx ));
- }
- case 3: {
- new i = pClan[ playerid ];
- if(!IsPlayerInRangeOfPoint(playerid, 3.0, OrgInfo[ i ][ orgSefX ], OrgInfo[ i ][ orgSefY ], OrgInfo[ i ][ orgSefZ ])) return SCM(playerid, -1, "Niste u blizini sefa.");
- ShowPlayerDialog(playerid, DIALOG_ORGSEF, DIALOG_STYLE_LIST, "Ostavi u sef:","Novac\nMaterijal\nDroga","U redu","Izlaz");
- }
- }
- }
- case DIALOG_ORGSEF: {
- if(!response) return 0;
- switch(listitem) {
- case 0: return ShowPlayerDialog(playerid, DIALOG_OSTAVINOVAC, DIALOG_STYLE_INPUT, "OSTAVI NOVAC","Upisite kolicinu novca.","U redu","Izlaz");
- case 1: return ShowPlayerDialog(playerid, DIALOG_OSTAVIMATS, DIALOG_STYLE_INPUT, "OSTAVI MATERIJAL","Upisite kolicinu materijala.","U redu","Izlaz");
- case 2: return ShowPlayerDialog(playerid, DIALOG_OSTAVIDROGU, DIALOG_STYLE_INPUT, "OSTAVI DROGU","Upisite kolicinu droge (grami).","U redu","Izlaz");
- }
- }
- case DIALOG_OSTAVINOVAC: {
- if(!response) return 0;
- new kol;
- if(sscanf(inputtext, "d", kol)) return ShowPlayerDialog(playerid, DIALOG_OSTAVINOVAC, DIALOG_STYLE_INPUT, "OSTAVI NOVAC","Upisite kolicinu novca.","U redu","Izlaz");
- if(kol > GetPlayerMoney(playerid)) return SCM(playerid, -1, "Nemate toliko novca.");
- OrgInfo[ pClan[ playerid ] ][ orgSefNovac ] += kol;
- GivePlayerMoney(playerid, -kol);
- SaveOrg(pClan[ playerid ]);
- }
- case DIALOG_OSTAVIMATS: {
- if(!response) return 0;
- // OSTAVI MATERIJALE
- }
- case DIALOG_OSTAVIDROGU: {
- if(!response) return 0;
- // OSTAVI DROGU
- }
- case DIALOG_LIDERCMD: {
- if(!response) return 0;
- switch(listitem) {
- case 0: return ShowPlayerDialog(playerid, DIALOG_UBACICLANA, DIALOG_STYLE_INPUT, "UBACI CLANA","Unesite ID clana.","U redu","Izlaz");
- case 1: return ShowPlayerDialog(playerid, DIALOG_IZBACICLANA, DIALOG_STYLE_INPUT, "IZBACI CLANA","Unesite ID clana.","U redu","Izlaz");
- case 2: return ShowPlayerDialog(playerid, DIALOG_IZBACICLANAOFF, DIALOG_STYLE_INPUT, "IZBACI OFFLINE CLANA","Unesite ime clana.","U redu","Izlaz");
- case 3: return ShowPlayerDialog(playerid, DIALOG_DODELIRANK, DIALOG_STYLE_INPUT, "DODELI RANK CLANU","Unesite id clana, pa ID ranka.\nPrimer: 4 3\nRank 0 - Suspendovan","U redu","Izlaz");
- case 4: {
- new str[ 120 ];
- format(str, sizeof(str), "Informacije o sefu:\n\nNovac: %d$\nMaterijali: %d\nDroga: %dg", OrgInfo[ pLider[ playerid ] ][ orgSefNovac ], OrgInfo[ pLider[ playerid ] ][ orgSefMats ], OrgInfo[ pLider[ playerid ] ][ orgSefDroga ]);
- ShowPlayerDialog(playerid, DIALOG_SEFINF, DIALOG_STYLE_MSGBOX, "SEF", str, "U redu","");
- }
- case 5: return ShowPlayerDialog(playerid, DIALOG_LIDERSEF, DIALOG_STYLE_LIST, "UZMI IZ SEFA","Novac\nMaterijal\nDrogu","U redu","Izlaz");
- case 6: {
- // POKRENI WAR
- }
- }
- }
- case DIALOG_UZMIOPREMU: {
- if(!response) return 0;
- UzeoOpremu[ playerid ] = true;
- switch(listitem) {
- case 0: return GivePlayerWeapon(playerid, 3, 500);
- case 1: {
- GivePlayerWeapon(playerid, 41, 500);
- GivePlayerWeapon(playerid, 24, 100);
- GivePlayerWeapon(playerid, 3, 500);
- GivePlayerWeapon(playerid, 30, 200);
- }
- case 2: {
- GivePlayerWeapon(playerid, 41, 500);
- GivePlayerWeapon(playerid, 24, 100);
- GivePlayerWeapon(playerid, 3, 500);
- GivePlayerWeapon(playerid, 30, 200);
- GivePlayerWeapon(playerid, 29, 200);
- GivePlayerWeapon(playerid, 25, 30);
- }
- case 3: {
- GivePlayerWeapon(playerid, 41, 500);
- GivePlayerWeapon(playerid, 24, 100);
- GivePlayerWeapon(playerid, 3, 500);
- GivePlayerWeapon(playerid, 30, 200);
- GivePlayerWeapon(playerid, 29, 200);
- GivePlayerWeapon(playerid, 25, 30);
- GivePlayerWeapon(playerid, 31, 200);
- GivePlayerWeapon(playerid, 17, 10);
- }
- case 4: {
- GivePlayerWeapon(playerid, 41, 500);
- GivePlayerWeapon(playerid, 24, 100);
- GivePlayerWeapon(playerid, 3, 500);
- GivePlayerWeapon(playerid, 30, 200);
- GivePlayerWeapon(playerid, 29, 200);
- GivePlayerWeapon(playerid, 27, 30);
- GivePlayerWeapon(playerid, 31, 200);
- GivePlayerWeapon(playerid, 17, 10);
- GivePlayerWeapon(playerid, 34, 50);
- }
- case 5: {
- GivePlayerWeapon(playerid, 41, 500);
- GivePlayerWeapon(playerid, 24, 100);
- GivePlayerWeapon(playerid, 3, 500);
- GivePlayerWeapon(playerid, 30, 200);
- GivePlayerWeapon(playerid, 29, 200);
- GivePlayerWeapon(playerid, 27, 30);
- GivePlayerWeapon(playerid, 31, 200);
- GivePlayerWeapon(playerid, 17, 10);
- GivePlayerWeapon(playerid, 34, 50);
- GivePlayerWeapon(playerid, 33, 50);
- }
- }
- }
- case DIALOG_LIDERSEF: {
- if(!response) return 0;
- if(!IsPlayerInRangeOfPoint(playerid, 3.0, OrgInfo[ pLider[ playerid ] ][ orgSefX ], OrgInfo[ pLider[ playerid ] ][ orgSefY ], OrgInfo[ pLider[ playerid ] ][ orgSefZ ])) return SCM(playerid, -1, "Niste kod sefa organizacije.");
- switch(listitem) {
- case 0: {
- new str[ 60 ];
- format(str, sizeof(str), "Upisite kolicinu novca.\nStanje: %d$", OrgInfo[ pClan[ playerid ] ][ orgSefNovac ]);
- ShowPlayerDialog(playerid, DIALOG_UZMINOVAC, DIALOG_STYLE_INPUT, "UZIMANJE NOVCA", str, "U redu","Izlaz");
- }
- case 1: {
- new str[ 60 ];
- format(str, sizeof(str), "Upisite kolicinu materijala.\nStanje: %d", OrgInfo[ pClan[ playerid ] ][ orgSefMats ]);
- ShowPlayerDialog(playerid, DIALOG_UZMIMATS, DIALOG_STYLE_INPUT, "UZIMANJE MATERIJALA", str, "U redu","Izlaz");
- }
- case 2: {
- new str[ 60 ];
- format(str, sizeof(str), "Upisite kolicinu droge.\nStanje: %dg", OrgInfo[ pClan[ playerid ] ][ orgSefDroga ]);
- ShowPlayerDialog(playerid, DIALOG_UZMIDROGU, DIALOG_STYLE_INPUT, "UZIMANJE DROGE", str, "U redu","Izlaz");
- }
- }
- }
- case DIALOG_UZMINOVAC: {
- if(!response) return 0;
- new kol;
- if(sscanf(inputtext, "d", kol)) {
- new str[ 60 ];
- format(str, sizeof(str), "Upisite kolicinu novca.\nStanje: %d$", OrgInfo[ pClan[ playerid ] ][ orgSefNovac ]);
- ShowPlayerDialog(playerid, DIALOG_UZMINOVAC, DIALOG_STYLE_INPUT, "UZIMANJE NOVCA", str, "U redu","Izlaz");
- return 1;
- }
- if(kol > OrgInfo[ pClan[ playerid ] ][ orgSefNovac ]) return SCM(playerid, -1, "Nemate toliko novca u sefu.");
- GivePlayerMoney(playerid, kol);
- OrgInfo[ pClan[ playerid ] ][ orgSefNovac ] -= kol;
- }
- case DIALOG_UZMIMATS: {
- if(!response) return 0;
- new kol;
- if(sscanf(inputtext, "d", kol)) {
- new str[ 60 ];
- format(str, sizeof(str), "Upisite kolicinu materijala.\nStanje: %d", OrgInfo[ pClan[ playerid ] ][ orgSefMats ]);
- ShowPlayerDialog(playerid, DIALOG_UZMIMATS, DIALOG_STYLE_INPUT, "UZIMANJE MATERIJALA", str, "U redu","Izlaz");
- return 1;
- }
- if(kol > OrgInfo[ pClan[ playerid ] ][ orgSefMats ]) return SCM(playerid, -1, "Nemate toliko materijala u sefu.");
- // Nesto sto daje materijale :D
- OrgInfo[ pClan[ playerid ] ][ orgSefMats ] -= kol;
- }
- case DIALOG_UZMIDROGU: {
- if(!response) return 0;
- new kol;
- if(sscanf(inputtext, "d", kol)) {
- new str[ 60 ];
- format(str, sizeof(str), "Upisite kolicinu droge.\nStanje: %dg", OrgInfo[ pClan[ playerid ] ][ orgSefDroga ]);
- ShowPlayerDialog(playerid, DIALOG_UZMIDROGU, DIALOG_STYLE_INPUT, "UZIMANJE DROGE", str, "U redu","Izlaz");
- return 1;
- }
- if(kol > OrgInfo[ pClan[ playerid ] ][ orgSefDroga ]) return SCM(playerid, -1, "Nemate toliko droge u sefu.");
- // Nesto sto daje drogu :D
- OrgInfo[ pClan[ playerid ] ][ orgSefDroga ] -= kol;
- }
- case DIALOG_DODELIRANK: {
- if(!response) return 0;
- new id, rid, str[ 35 ];
- if(sscanf(inputtext, "ud", id, rid)) return ShowPlayerDialog(playerid, DIALOG_DODELIRANK, DIALOG_STYLE_INPUT, "DODELI RANK CLANU","Unesite id clana, pa ID ranka.\nPrimer: 4 3\nRank 0 - Suspendovan","U redu","Izlaz");
- if(rid > 4) return SCM(playerid, -1, "Rank ID : 0 - 4");
- if(pClan[ id ] != pLider[ playerid ]) return SCM(playerid, -1, "Taj igrac nije clan Vase organizacije.");
- if(pLider[ id ] == pLider[ playerid ]) return SCM(playerid, -1, "Taj igrac je lider.");
- if(rid == 0 && !OrgInfo[ pLider[ playerid ] ][ orgDrzavna ]) return SCM(playerid, -1, "Ne mozete dati rank 0 igracu, niste drzavna organizacija.");
- if(rid == 0 && OrgInfo[ pLider[ playerid ] ][ orgDrzavna ]) {
- SCM(id, -1, "Lider Vas je suspendovao.");
- SCM(playerid, -1, "Suspendovali ste igraca.");
- pRank[ id ] = rid;
- ResetPlayerWeapons(playerid);
- PoliceDuty[ id ] = false;
- SetPlayerArmour(id, 0);
- SetPlayerHealth(id, 99);
- SetPlayerColor(id, 0xFFFFFF00);
- SetPlayerSkin(id, 1);
- }
- else {
- format(str, sizeof(str), "Lider Vas je unapredio u rank %d.", rid);
- SCM(id, -1, str);
- SCM(playerid, -1, "Dodelili ste igracu rank.");
- pRank[ id ] = rid;
- if(rid == 1) { if(!pZensko[ playerid ]) { SetPlayerSkin(id, OrgInfo[ pLider[ playerid ] ][ orgSkin1 ]); } else { SetPlayerSkin(id, OrgInfo[ pLider[ playerid ] ][ orgZSkin1 ]); } }
- else if(rid == 2) { if(!pZensko[ playerid ]) { SetPlayerSkin(id, OrgInfo[ pLider[ playerid ] ][ orgSkin2 ]); } else { SetPlayerSkin(id, OrgInfo[ pLider[ playerid ] ][ orgZSkin2 ]); } }
- else if(rid == 3) { if(!pZensko[ playerid ]) { SetPlayerSkin(id, OrgInfo[ pLider[ playerid ] ][ orgSkin3 ]); } else { SetPlayerSkin(id, OrgInfo[ pLider[ playerid ] ][ orgZSkin3 ]); } }
- else if(rid == 4) { if(!pZensko[ playerid ]) { SetPlayerSkin(id, OrgInfo[ pLider[ playerid ] ][ orgSkin4 ]); } else { SetPlayerSkin(id, OrgInfo[ pLider[ playerid ] ][ orgZSkin4 ]); } }
- }
- }
- case DIALOG_UBACICLANA: {
- if(!response) return 0;
- new id, pname[ MAX_PLAYER_NAME ], str[ 115 ];
- if(sscanf(inputtext, "u", id)) return ShowPlayerDialog(playerid, DIALOG_UBACICLANA, DIALOG_STYLE_INPUT, "UBACI CLANA","Unesite ID clana.","U redu","Izlaz");
- if(pClan[ id ] > 0) return SCM(playerid, -1, "Taj igrac je vec clan neke organizacije.");
- if(pLider[ id ] == pLider[ playerid ]) return SCM(playerid, -1, "Taj igrac je lider.");
- if(OrgInfo[ pLider[ playerid ] ][ orgClanovi ] == MAX_CLANOVI) return SCM(playerid, -1, "Dostigli ste maximalan broj clanova.");
- GetPlayerName(playerid, pname, sizeof(pname));
- SCM(playerid, -1, "Poslali ste poziv za organizaciju.");
- format(str, sizeof(str), "Lider %s Vam je poslao poziv da se pridruzite\nOrganizaciji %s.", pname, OrgInfo[ pLider[ playerid ] ][ orgIme ]);
- SPD(id, DIALOG_ORGINV, DIALOG_STYLE_MSGBOX, "POZIV", str, "Prihvati","Odbij");
- oPozvan[ id ] = pLider[ playerid ];
- }
- case DIALOG_IZBACICLANA: {
- if(!response) return 0;
- new id, OrgID = pLider[ playerid ];
- if(sscanf(inputtext, "u", id)) return ShowPlayerDialog(playerid, DIALOG_IZBACICLANA, DIALOG_STYLE_INPUT, "IZBACI CLANA","Unesite ID clana.","U redu","Izlaz");
- if(pClan[ id ] != pLider[ playerid ]) return SCM(playerid, -1, "Taj igrac nije clan Vase organizacije.");
- if(pLider[ id ] == pLider[ playerid ]) return SCM(playerid, -1, "Taj igrac je lider.");
- SCM(id, -1, "Izbaceni ste iz organizacije.");
- SetPlayerSkin(id, 1);
- pClan[ id ] = 0;
- SCM(playerid, -1, "Izbacili ste igraca iz organizacije.");
- OrgInfo[ pLider[ playerid ] ][ orgClanovi ]--;
- if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan1 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan1], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME); }
- if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan2 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan2 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan3 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan3 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan4 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan4 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan5 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan5 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan6 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan6 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan7 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan7 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan8 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan8 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan9 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan9 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan10 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan10 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan11 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan11 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan12 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan12 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan13 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan13 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan18 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan18 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan19 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan19 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan20 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan20 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan21 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan21 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan22 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan22 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan23 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan23 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan24 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan24 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan25 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan25 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan26 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan26 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan27 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan27 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan28 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan28 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan29 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan29 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- if( strcmp( ImeIgraca(id), OrgInfo[ OrgID ][ orgClan30 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan30 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- SaveOrg(pLider[ playerid ]);
- }
- case DIALOG_IZBACICLANAOFF: {
- if(!response) return 0;
- new imeigraca[ 24 ], OrgID = pLider[ playerid ];
- if( sscanf( inputtext, "s[24]", imeigraca ) ) return SendClientMessage(playerid, -1, "Nepravilno uneto ime i prezime( Ime_Prezime )!" );
- if( IsPlayerConnected( GetPlayerIdFromName( imeigraca ) ) ) {
- SendClientMessage( playerid, -1, "Taj igrac je online tako da izbaci ga online.");
- return 1;
- }
- if(pClan[ GetPlayerIdFromName( imeigraca ) ] != pLider[ playerid ]) return SCM(playerid, -1, "Taj igrac nije clan Vase organizacije.");
- if(pLider[ GetPlayerIdFromName( imeigraca ) ] == pLider[ playerid ]) return SCM(playerid, -1, "Taj igrac je lider.");
- if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan1 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan1], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan2 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan2 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan3 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan3 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan4 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan4 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan5 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan5 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan6 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan6 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan7 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan7 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan8 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan8 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan9 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan9 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan10 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan10 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan11 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan11 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan12 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan12 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan13 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan13 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan14 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan14 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan15 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan15 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan16 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan16 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan17 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan17 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan18 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan18 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan19 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan19 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan20 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan20 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan21 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan21 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan22 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan22 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan23 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan23 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan24 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan24 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan25 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan25 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan26 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan26 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan27 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan27 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan28 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan28 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan29 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan29 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- else if( strcmp( imeigraca, OrgInfo[ OrgID ][ orgClan30 ], true ) == 0) { strmid( OrgInfo[ OrgID ][ orgClan30 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); }
- OrgInfo[ OrgID ][ orgClanovi ]--;
- SaveOrg( OrgID );
- }
- case DIALOG_SAVEZ: {
- new id = PoslaoSavez[ playerid ];
- if(!response) {
- SCM(playerid, -1, "Odbili ste zahtev za savez.");
- SCM(id, -1, "Zahtev za savez odbijen.");
- PoslaoSavez[ playerid ] = -1;
- CekaSavez[ id ] = false;
- }
- else {
- OrgInfo[ pLider[ playerid ] ][ orgUSavezu ] = pLider[ id ];
- OrgInfo[ pLider[ id ] ][ orgUSavezu ] = pLider[ playerid ];
- SCM(id, -1, "Zahtev za savez prihvacen.");
- SCM(playerid, -1, "Prihvatili ste zahtev za savez.");
- SaveOrg(pLider[ id ]);
- SaveOrg(pLider[ playerid ]);
- PoslaoSavez[ playerid ] = -1;
- CekaSavez[ id ] = false;
- }
- }
- }
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) {
- if(newkeys == KEY_YES) {
- if(KreiraZonu[ playerid ] != 0 && !KreiraPickup[ playerid ]) {
- new i = KreiraZonu[ playerid ], Float:X, Float:Y, Float:Z;
- GetPlayerPos(playerid, X,Y,Z);
- OrgInfo[ i ][ zMaxX ] = X;
- OrgInfo[ i ][ zMaxY ] = Y;
- OrgInfo[ i ][ zID ] = GangZoneCreate(OrgInfo[ i ][ zMinX ], OrgInfo[ i ][ zMinY ], X, Y);
- SPD(playerid, DIALOG_ZONACREATE, DIALOG_STYLE_INPUT, "Zona Kreiranje","Upisite HEX Boju zone.","U redu","Izlaz");
- }
- else if(KreiraPickup[ playerid ]) {
- new i = KreiraZonu[ playerid ], Float:X, Float:Y, Float:Z;
- GetPlayerPos(playerid, X,Y,Z);
- OrgInfo[ i ][ pPosX ] = X;
- OrgInfo[ i ][ pPosY ] = Y;
- OrgInfo[ i ][ pPosZ ] = Z;
- OrgInfo[ i ][ pID ] = CreatePickup(1254, 1, X,Y,Z, 0);
- new str[ 70 ];
- format(str, sizeof(str), "[ %s ]\n{FFFFFF}Da zauzmete, kucajte /zauzmi", OrgInfo[ i ][ orgIme ]);
- ZauzimanjeLabel[ i ] = Create3DTextLabel(str, OrgInfo[ i ][ orgBoja ], X,Y,Z, 15.0, 0, 0);
- SCM(playerid, -1, "Zavrsili ste kreiranje organizacije.");
- OrgInfo[ i ][ orgZauzeta ] = i;
- SaveOrg(i);
- KreiraZonu[ playerid ] = 0;
- KreiraPickup[ playerid ] = false;
- }
- }
- if(newkeys == KEY_SECONDARY_ATTACK) {
- for(new i; i < MAX_ORGS; i++) {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, OrgInfo[ i ][ orgPosX ], OrgInfo[ i ][ orgPosY ], OrgInfo[ i ][ orgPosZ ])) {
- SetPlayerPos(playerid, OrgInfo[ i ][ intPosX ], OrgInfo[ i ][ intPosY ], OrgInfo[ i ][ intPosZ ]);
- SetPlayerInterior(playerid, OrgInfo[ i ][ orgInt ]);
- SetPlayerVirtualWorld(playerid, OrgInfo[ i ][ orgVW ]);
- }
- else if(IsPlayerInRangeOfPoint(playerid, 2.0, OrgInfo[ i ][ intPosX ], OrgInfo[ i ][ intPosY ], OrgInfo[ i ][ intPosZ ])) {
- SetPlayerPos(playerid, OrgInfo[ i ][ orgPosX ], OrgInfo[ i ][ orgPosY ], OrgInfo[ i ][ orgPosZ ]);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- }
- }
- }
- if(newkeys == KEY_CROUCH) {
- for(new i; i < MAX_ORGGATES; i++) {
- if(IsPlayerInRangeOfPoint(playerid, 7.0, OrgGateInfo[ i ][ ogPosX ], OrgGateInfo[ i ][ ogPosY ], OrgGateInfo[ i ][ ogPosZ ])) {
- if(pClan[ playerid ] != OrgGateInfo[ i ][ ogOrgID ]) return 0;
- if(!OrgGateInfo[ i ][ ogOtvorena ]) {
- new str[ 60 ];
- MoveObject(OrgGateInfo[ i ][ ogID ], OrgGateInfo[ i ][ oogPosX ], OrgGateInfo[ i ][ oogPosY ], OrgGateInfo[ i ][ oogPosZ ], OrgGateInfo[ i ][ ogBrzinaZ ], OrgGateInfo[ i ][ oogRotX ], OrgGateInfo[ i ][ oogRotY ], OrgGateInfo[ i ][ oogRotZ ]);
- KapijaTimer[ i ] = SetTimerEx("CloseGate", OrgGateInfo[ i ][ ogVremeZ ]*1000, false, "i", i);
- OrgGateInfo[ i ][ ogOtvorena ] = true;
- format(str, sizeof(str), "Otvorili ste kapiju, zatvorice se automatski za %d sekundi.", OrgGateInfo[ i ][ ogVremeZ ]);
- SCM(playerid, -1, str);
- }
- else {
- MoveObject(OrgGateInfo[ i ][ ogID ], OrgGateInfo[ i ][ ogPosX ], OrgGateInfo[ i ][ ogPosY ], OrgGateInfo[ i ][ ogPosZ ], OrgGateInfo[ i ][ ogBrzinaZ ], OrgGateInfo[ i ][ ogRotX ], OrgGateInfo[ i ][ ogRotY ], OrgGateInfo[ i ][ ogRotZ ]);
- KillTimer(KapijaTimer[ i ]);
- OrgGateInfo[ i ][ ogOtvorena ] = false;
- SCM(playerid, -1, "Zatvorili ste kapiju.");
- }
- }
- }
- }
- return 1;
- }
- forward CloseGate(id); public CloseGate(id) {
- MoveObject(OrgGateInfo[ id ][ ogID ], OrgGateInfo[ id ][ ogPosX ], OrgGateInfo[ id ][ ogPosY ], OrgGateInfo[ id ][ ogPosZ ], OrgGateInfo[ id ][ ogBrzinaZ ], OrgGateInfo[ id ][ ogRotX ], OrgGateInfo[ id ][ ogRotY ], OrgGateInfo[ id ][ ogRotZ ]);
- OrgGateInfo[ id ][ ogOtvorena ] = false;
- return 1;
- }
- forward ZauzimanjeVreme(playerid);
- public ZauzimanjeVreme(playerid) {
- new i = Zauzima[ playerid ], str[ 70 ];
- GangZoneHideForAll(OrgInfo[ i ][ zID ]);
- GangZoneShowForAll(OrgInfo[ i ][ zID ], OrgInfo[ i ][ zBoja ]);
- format(str, sizeof(str), "[ %s ]\n{FFFFFF}Da zauzmete, kucajte /zauzmi", OrgInfo[ pClan[ playerid ] ][ orgIme ]);
- Update3DTextLabelText(ZauzimanjeLabel[ i ], OrgInfo[ i ][ orgBoja ], str);
- GivePlayerMoney(playerid, 50000);
- ClearAnimations(playerid);
- TogglePlayerControllable(playerid, true);
- SCM(playerid, -1, "Uspesno ste zauzeli zonu.");
- return 1;
- }
- public OnPlayerDeath(playerid) {
- if(Zauzima[ playerid ] != 0) { KillTimer(ZauzimanjeTimer[ playerid ]); }
- if(PoliceDuty[ playerid ]) {
- ResetPlayerWeapons(playerid);
- PoliceDuty[ playerid ] = false;
- SetPlayerArmour(playerid, 0);
- SetPlayerHealth(playerid, 99);
- UzeoOpremu[ playerid ] = false;
- SetPlayerColor(playerid, 0xFFFFFF00);
- SetPlayerSkin(playerid, StariSkin[ playerid ]);
- }
- return 1;
- }
- forward LoadOrgGate(id, name[], value[]);
- public LoadOrgGate(id, name[], value[]) {
- INI_Int("ORG_ID", OrgGateInfo[ id ][ ogOrgID ]);
- INI_Int("Object_ID", OrgGateInfo[ id ][ ogObjID ]);
- INI_Float("Lokacija_X", OrgGateInfo[ id ][ ogPosX ]);
- INI_Float("Lokacija_Y", OrgGateInfo[ id ][ ogPosY ]);
- INI_Float("Lokacija_Z", OrgGateInfo[ id ][ ogPosZ ]);
- INI_Float("Rotacija_X", OrgGateInfo[ id ][ ogRotX ]);
- INI_Float("Rotacija_Y", OrgGateInfo[ id ][ ogRotY ]);
- INI_Float("Rotacija_Z", OrgGateInfo[ id ][ ogRotZ ]);
- INI_Float("Otvorena_X", OrgGateInfo[ id ][ oogPosX ]);
- INI_Float("Orvorena_Y", OrgGateInfo[ id ][ oogPosY ]);
- INI_Float("Otvorena_Z", OrgGateInfo[ id ][ oogPosZ ]);
- INI_Float("Otvorena_RX", OrgGateInfo[ id ][ oogRotX ]);
- INI_Float("Otvorena_RY", OrgGateInfo[ id ][ oogRotY ]);
- INI_Float("Otvorena_RZ", OrgGateInfo[ id ][ oogRotZ ]);
- INI_Int("Vreme_Zatvaranja", OrgGateInfo[ id ][ ogVremeZ ]);
- INI_Int("Brzina_Zatvaranja", OrgGateInfo[ id ][ ogBrzinaZ ]);
- return 1;
- }
- forward LoadOrg(id, name[], value[]);
- public LoadOrg(id, name[], value[]) {
- INI_String("Ime", OrgInfo[ id ][ orgIme ], 30);
- INI_String("Skracenica", OrgInfo[ id ][ orgSkracenica ], 5);
- INI_Bool("Banda",OrgInfo[ id ][ orgBanda ]);
- INI_Bool("Mafija",OrgInfo[ id ][ orgMafija ]);
- INI_Bool("Drzavna",OrgInfo[ id ][ orgDrzavna ]);
- INI_Int("Interior_ID", OrgInfo[ id ][ orgInt ]);
- INI_Int("Virtual_World", OrgInfo[ id ][ orgVW ]);
- INI_Int("Savezna_Org_ID", OrgInfo[ id ][ orgUSavezu ]);
- INI_Hex("Boja", OrgInfo[ id ][ orgBoja ]);
- INI_Hex("Boja_Zone", OrgInfo[ id ][ zBoja ]);
- INI_Int("Clanovi", OrgInfo[ id ][ orgClanovi ]);
- INI_Bool("Lider_Slot_1", OrgInfo[ id ][ orgLiderSlot1 ]);
- INI_Bool("Lider_Slot_2", OrgInfo[ id ][ orgLiderSlot2 ]);
- INI_String("Rank_1", OrgInfo[ id ][ orgRank1 ], 24);
- INI_String("Rank_2", OrgInfo[ id ][ orgRank2 ], 24);
- INI_String("Rank_3", OrgInfo[ id ][ orgRank3 ], 24);
- INI_String("Rank_4", OrgInfo[ id ][ orgRank4 ], 24);
- INI_String("Rank_5", OrgInfo[ id ][ orgRank5 ], 24);
- INI_Int("Skin_Rank_1", OrgInfo[ id ][ orgSkin1 ]);
- INI_Int("Skin_Rank_2", OrgInfo[ id ][ orgSkin2 ]);
- INI_Int("Skin_Rank_3", OrgInfo[ id ][ orgSkin3 ]);
- INI_Int("Skin_Rank_4", OrgInfo[ id ][ orgSkin4 ]);
- INI_Int("Skin_Rank_5", OrgInfo[ id ][ orgSkin5 ]);
- INI_Int("Zenski_Skin_1", OrgInfo[ id ][ orgZSkin1 ]);
- INI_Int("Zenski_Skin_2", OrgInfo[ id ][ orgZSkin2 ]);
- INI_Int("Zenski_Skin_3", OrgInfo[ id ][ orgZSkin3 ]);
- INI_Int("Zenski_Skin_4", OrgInfo[ id ][ orgZSkin4 ]);
- INI_Int("Zenski_Skin_5", OrgInfo[ id ][ orgZSkin5 ]);
- INI_Float("Lokacija_X", OrgInfo[ id ][ orgPosX ]);
- INI_Float("Lokacija_Y", OrgInfo[ id ][ orgPosY ]);
- INI_Float("Lokacija_Z", OrgInfo[ id ][ orgPosZ ]);
- INI_Float("Interior_X", OrgInfo[ id ][ intPosX ]);
- INI_Float("Interior_Y", OrgInfo[ id ][ intPosY ]);
- INI_Float("Interior_Z", OrgInfo[ id ][ intPosZ ]);
- INI_Float("Zona_Min_X", OrgInfo[ id ][ zMinX ]);
- INI_Float("Zona_Min_Y", OrgInfo[ id ][ zMinY ]);
- INI_Float("Zona_Max_X", OrgInfo[ id ][ zMaxX ]);
- INI_Float("Zona_Max_Y", OrgInfo[ id ][ zMaxY ]);
- INI_Float("Zauzimanje_X", OrgInfo[ id ][ pPosX ]);
- INI_Float("Zauzimanje_Y", OrgInfo[ id ][ pPosY ]);
- INI_Float("Zauzimanje_Z", OrgInfo[ id ][ pPosZ ]);
- INI_Int("ORG_Zauzeta", OrgInfo[ id ][ orgZauzeta ]);
- INI_Float("Sef_X", OrgInfo[ id ][ orgSefX ]);
- INI_Float("Sef_Y", OrgInfo[ id ][ orgSefY ]);
- INI_Float("Sef_Z", OrgInfo[ id ][ orgSefZ ]);
- INI_Float("Sef_RX", OrgInfo[ id ][ orgSefRX ]);
- INI_Float("Sef_RY", OrgInfo[ id ][ orgSefRY ]);
- INI_Float("Sef_RZ", OrgInfo[ id ][ orgSefRZ ]);
- INI_Int("Sef_ObjID", OrgInfo[ id ][ orgSefObjID ]);
- INI_Int("Kolicina_Novca", OrgInfo[ id ][ orgSefNovac ]);
- INI_Int("Kolicina_Materijala", OrgInfo[ id ][ orgSefMats ]);
- INI_Int("Kolicina_Droge", OrgInfo[ id ][ orgSefDroga ]);
- INI_Float("PDDuty_X", OrgInfo[ id ][ orgPDDutyX ]);
- INI_Float("PDDuty_Y", OrgInfo[ id ][ orgPDDutyY ]);
- INI_Float("PDDuty_Z", OrgInfo[ id ][ orgPDDutyZ ]);
- INI_Float("Gun_X", OrgInfo[ id ][ orgGunX ]);
- INI_Float("Gun_Y", OrgInfo[ id ][ orgGunY ]);
- INI_Float("Gun_Z", OrgInfo[ id ][ orgGunZ ]);
- INI_Float("Hapsenje_X", OrgInfo[ id ][ orgHapsenjeX ]);
- INI_Float("Hapsenje_Y", OrgInfo[ id ][ orgHapsenjeY ]);
- INI_Float("Hapsenje_Z", OrgInfo[ id ][ orgHapsenjeZ ]);
- INI_String("Lider_1", OrgInfo[ id ][ orgLider1 ], 24);
- INI_String("Lider_2", OrgInfo[ id ][ orgLider2 ], 24);
- INI_String("Clan_1", OrgInfo[ id ][ orgClan1 ], 24);
- INI_String("Clan_2", OrgInfo[ id ][ orgClan2 ], 24);
- INI_String("Clan_3", OrgInfo[ id ][ orgClan3 ], 24);
- INI_String("Clan_4", OrgInfo[ id ][ orgClan4 ], 24);
- INI_String("Clan_5", OrgInfo[ id ][ orgClan5 ], 24);
- INI_String("Clan_6", OrgInfo[ id ][ orgClan6 ], 24);
- INI_String("Clan_7", OrgInfo[ id ][ orgClan7 ], 24);
- INI_String("Clan_8", OrgInfo[ id ][ orgClan8 ], 24);
- INI_String("Clan_9", OrgInfo[ id ][ orgClan9 ], 24);
- INI_String("Clan_10", OrgInfo[ id ][ orgClan10 ], 24);
- INI_String("Clan_11", OrgInfo[ id ][ orgClan11 ], 24);
- INI_String("Clan_12", OrgInfo[ id ][ orgClan12 ], 24);
- INI_String("Clan_13", OrgInfo[ id ][ orgClan13 ], 24);
- INI_String("Clan_14", OrgInfo[ id ][ orgClan14 ], 24);
- INI_String("Clan_15", OrgInfo[ id ][ orgClan15 ], 24);
- INI_String("Clan_16", OrgInfo[ id ][ orgClan16 ], 24);
- INI_String("Clan_17", OrgInfo[ id ][ orgClan17 ], 24);
- INI_String("Clan_18", OrgInfo[ id ][ orgClan18 ], 24);
- INI_String("Clan_19", OrgInfo[ id ][ orgClan19 ], 24);
- INI_String("Clan_20", OrgInfo[ id ][ orgClan20 ], 24);
- INI_String("Clan_21", OrgInfo[ id ][ orgClan21 ], 24);
- INI_String("Clan_22", OrgInfo[ id ][ orgClan22 ], 24);
- INI_String("Clan_23", OrgInfo[ id ][ orgClan23 ], 24);
- INI_String("Clan_24", OrgInfo[ id ][ orgClan24 ], 24);
- INI_String("Clan_25", OrgInfo[ id ][ orgClan25 ], 24);
- INI_String("Clan_26", OrgInfo[ id ][ orgClan26 ], 24);
- INI_String("Clan_27", OrgInfo[ id ][ orgClan27 ], 24);
- INI_String("Clan_28", OrgInfo[ id ][ orgClan28 ], 24);
- INI_String("Clan_29", OrgInfo[ id ][ orgClan29 ], 24);
- INI_String("Clan_30", OrgInfo[ id ][ orgClan30 ], 24);
- return 1;
- }
- forward LoadOrgVeh(id, name[], value[]);
- public LoadOrgVeh(id, name[], value[]) {
- INI_Int("Organizacija_ID", OrgVehInfo[ id ][ ovOrgID ]);
- INI_Int("Model", OrgVehInfo[ id ][ ovModel ]);
- INI_Float("Lokacija_X", OrgVehInfo[ id ][ ovPosX ]);
- INI_Float("Lokacija_Y", OrgVehInfo[ id ][ ovPosY ]);
- INI_Float("Lokacija_Z", OrgVehInfo[ id ][ ovPosZ ]);
- INI_Float("Rotacija_A", OrgVehInfo[ id ][ ovRotA ]);
- INI_Int("Boja_1", OrgVehInfo[ id ][ ovBoja1 ]);
- INI_Int("Boja_2", OrgVehInfo[ id ][ ovBoja2 ]);
- return 1;
- }
- public OnFilterScriptInit() {
- for(new i; i < MAX_ORGS; i++) {
- new jFile[ 50 ], str[ 256 ];
- format(jFile, sizeof(jFile), ORG_FILE, i);
- if(fexist(jFile)) {
- INI_ParseFile(jFile, "LoadOrg", .bExtra = true, .extra = i);
- OrgInfo[ i ][ oID ] = CreatePickup(1314, 1, OrgInfo[ i ][ orgPosX ], OrgInfo[ i ][ orgPosY ], OrgInfo[ i ][ orgPosZ ], 0);
- format( str, sizeof( str ),""col_srvboja"~ "col_white"%s"col_srvboja" ~\n "col_white"ID: "col_srvboja"%d \n "col_white"Br.Clanova:"col_srvboja" %d\n"col_white"Lider 1: "col_srvboja"%s\n"col_white"Lider 2: "col_srvboja"%s\n{FFFFFF}Za ulaz pritisnite - "col_srvboja"ENTER", OrgInfo[ i ][ orgIme ],i,OrgInfo[ i ][ orgClanovi ],OrgInfo[ i ][ orgLider1 ],OrgInfo[ i ][ orgLider2 ] );
- OrgLabel[ i ] = Create3DTextLabel(str, OrgInfo[ i ][ orgBoja ], OrgInfo[ i ][ orgPosX ], OrgInfo[ i ][ orgPosY ], OrgInfo[ i ][ orgPosZ ], 15.0, 0,0);
- OrgInfo[ i ][ pID ] = CreatePickup(1254, 1, OrgInfo[ i ][ pPosX ], OrgInfo[ i ][ pPosY ], OrgInfo[ i ][ pPosZ ], 0);
- format(str, sizeof(str), "[ %s ]\n{FFFFFF}Da zauzmete, kucajte /zauzmi", OrgInfo[ i ][ orgIme ]);
- ZauzimanjeLabel[ i ] = Create3DTextLabel(str, OrgInfo[ i ][ orgBoja ], OrgInfo[ i ][ pPosX ], OrgInfo[ i ][ pPosY ], OrgInfo[ i ][ pPosZ ], 15.0, 0, 0);
- OrgInfo[ i ][ zID ] = GangZoneCreate(OrgInfo[ i ][ zMinX ], OrgInfo[ i ][ zMinY ], OrgInfo[ i ][ zMaxX ], OrgInfo[ i ][ zMaxY ]);
- OrgInfo[ i ][ orgSefID ] = CreateObject(OrgInfo[ i ][ orgSefObjID ], OrgInfo[ i ][ orgSefX ], OrgInfo[ i ][ orgSefY ], OrgInfo[ i ][ orgSefZ ], OrgInfo[ i ][ orgSefRX ], OrgInfo[ i ][ orgSefRY ], OrgInfo[ i ][ orgSefRZ ]);
- OrgInfo[ i ][ orgSefLabel ] = Create3DTextLabel("~ {FFFFFF}/org {0057AE}~", 0x0057AEFF, OrgInfo[ i ][ orgSefX ], OrgInfo[ i ][ orgSefY ], OrgInfo[ i ][ orgSefZ ], 10.0, 0, 0);
- if(OrgInfo[ i ][ orgDrzavna ]) {
- OrgInfo[ i ][ orgPDDutyPickup ] = CreatePickup(1247, 1, OrgInfo[ i ][ orgPDDutyX ], OrgInfo[ i ][ orgPDDutyY ], OrgInfo[ i ][ orgPDDutyZ ], 0);
- OrgInfo[ i ][ orgPDDutyLabel ] = Create3DTextLabel("~ {FFFFFF}/duty {0057AE}~", 0x0057AEFF, OrgInfo[ i ][ orgPDDutyX ], OrgInfo[ i ][ orgPDDutyY ], OrgInfo[ i ][ orgPDDutyZ ], 10.0, 0, 0);
- OrgInfo[ i ][ orgGunPickup ] = CreatePickup(1239, 1, OrgInfo[ i ][ orgGunX ], OrgInfo[ i ][ orgGunY ], OrgInfo[ i ][ orgGunZ ], 0);
- OrgInfo[ i ][ orgGunLabel ] = Create3DTextLabel("~ {FFFFFF}/gun {0057AE}~", 0x0057AEFF, OrgInfo[ i ][ orgGunX ], OrgInfo[ i ][ orgGunY ], OrgInfo[ i ][ orgGunZ ], 10.0, 0, 0);
- OrgInfo[ i ][ orgHapsenjePickup ] = CreatePickup(1239, 1, OrgInfo[ i ][ orgHapsenjeX ], OrgInfo[ i ][ orgHapsenjeY ], OrgInfo[ i ][ orgHapsenjeZ ], 0);
- OrgInfo[ i ][ orgHapsenjeLabel ] = Create3DTextLabel("~ {FFFFFF}/arrest {0057AE}~", 0x0057AEFF, OrgInfo[ i ][ orgHapsenjeX ], OrgInfo[ i ][ orgHapsenjeY ], OrgInfo[ i ][ orgHapsenjeZ ], 10.0, 0, 0);
- }
- }
- }
- for(new i; i < MAX_ORGVEHS; i++) {
- new jFile[ 50 ], str[ 35 ];
- format(jFile, sizeof(jFile), ORGVEH_FILE, i);
- if(fexist(jFile)) {
- INI_ParseFile(jFile, "LoadOrgVeh", .bExtra = true, .extra = i);
- OrgVehInfo[ i ][ ovID ] = CreateVehicle(OrgVehInfo[ i ][ ovModel ], OrgVehInfo[ i ][ ovPosX ], OrgVehInfo[ i ][ ovPosY ], OrgVehInfo[ i ][ ovPosZ ], OrgVehInfo[ i ][ ovRotA ], OrgVehInfo[ i ][ ovBoja1 ], OrgVehInfo[ i ][ ovBoja2 ], -1);
- format(str, sizeof(str), "[ %s ]", OrgInfo[ OrgVehInfo[ i ][ ovOrgID ] ][ orgIme ]);
- OrgVehLabel[ i ] = Create3DTextLabel(str, OrgInfo[ OrgVehInfo[ i ][ ovOrgID ] ][ orgBoja ], OrgVehInfo[ i ][ ovPosX ], OrgVehInfo[ i ][ ovPosY ], OrgVehInfo[ i ][ ovPosZ ], 15.0, 0, 0);
- Attach3DTextLabelToVehicle(OrgVehLabel[ i ], OrgVehInfo[ i ][ ovID ], 0.0, 0.0, 0.0);
- TipVozila[ i ] = 1;
- }
- }
- for(new i; i < MAX_ORGGATES; i++) {
- new ogFile[ 60 ];
- format(ogFile, sizeof(ogFile), ORGGATES_FILE, i);
- if(fexist(ogFile)) {
- INI_ParseFile(ogFile, "LoadOrgGate", .bExtra = true, .extra = i);
- OrgGateInfo[ i ][ ogID ] = CreateObject(OrgGateInfo[ i ][ ogObjID ], OrgGateInfo[ i ][ ogPosX ], OrgGateInfo[ i ][ ogPosY ], OrgGateInfo[ i ][ ogPosZ ], OrgGateInfo[ i ][ ogRotX ], OrgGateInfo[ i ][ ogRotY ], OrgGateInfo[ i ][ ogRotZ ]);
- }
- }
- return 1;
- }
- public OnPlayerSpawn(playerid) {
- for(new i; i < MAX_ORGS; i++) { GangZoneShowForPlayer(playerid, OrgInfo[ i ][ zID ], OrgInfo[ i ][ zBoja ]); }
- pUlogovan[ playerid ] = true;
- PoslaoSavez[ playerid ] = -1;
- return 1;
- }
- forward TimerZatvor(playerid);
- public TimerZatvor(playerid) {
- pZatvorVreme[ playerid ] -= 1000;
- new str[ 50 ];
- format(str, sizeof(str), "~w~Preostalo ~b~%d ~w~sekundi.", pZatvorVreme[ playerid ]/1000);
- GameTextForPlayer(playerid, str, 1000, 3);
- if(pZatvorVreme[ playerid ] == 0) {
- GameTextForPlayer(playerid, "~g~Pusteni ste iz zatvora.", 5000, 3);
- KillTimer(ZatvorTimer[ playerid ]);
- // SetPlayerPos(playerid, X,Y,Z); // MESTO GDE DA SE SPAWNA
- }
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate) {
- if(newstate == PLAYER_STATE_DRIVER) { if(TipVozila[ GetPlayerVehicleID(playerid) ] == 1) { if(pClan[ playerid ] != OrgVehInfo[ GetPlayerVehicleID(playerid) ][ ovOrgID ] && pLider[ playerid ] != OrgVehInfo[ GetPlayerVehicleID(playerid) ][ ovOrgID ]) { RemovePlayerFromVehicle(playerid); SCM(playerid, -1, "Ne mozete voziti to vozilo."); } } }
- return 1;
- }
- public OnPlayerEditObject(playerid, playerobject, objectid, response, Float:fX, Float:fY, Float:fZ, Float:fRotX, Float:fRotY, Float:fRotZ) {
- if(response == EDIT_RESPONSE_FINAL && KreiraKapiju[ playerid ] != 0) {
- new i = KreiraKapiju[ playerid ];
- if(!KreiraZatvorenu[ playerid ]) {
- OrgGateInfo[ i ][ ogPosX ] = fX;
- OrgGateInfo[ i ][ ogPosY ] = fY;
- OrgGateInfo[ i ][ ogPosZ ] = fZ;
- OrgGateInfo[ i ][ ogRotX ] = fRotX;
- OrgGateInfo[ i ][ ogRotY ] = fRotY;
- OrgGateInfo[ i ][ ogRotZ ] = fRotZ;
- DestroyObject(OrgGateInfo[ i ][ ogID ]);
- OrgGateInfo[ i ][ ogID ] = CreateObject(OrgGateInfo[ i ][ ogObjID ], fX, fY, fZ, fRotX, fRotY, fRotZ);
- EditObject(playerid, OrgGateInfo[ i ][ ogID ]);
- SCM(playerid, -1, "Sada sacuvajte pozicije otvorene kapije.");
- KreiraZatvorenu[ playerid ] = true;
- }
- else {
- OrgGateInfo[ i ][ oogPosX ] = fX;
- OrgGateInfo[ i ][ oogPosY ] = fY;
- OrgGateInfo[ i ][ oogPosZ ] = fZ;
- OrgGateInfo[ i ][ oogRotX ] = fRotX;
- OrgGateInfo[ i ][ oogRotY ] = fRotY;
- OrgGateInfo[ i ][ oogRotZ ] = fRotZ;
- DestroyObject(OrgGateInfo[ i ][ ogID ]);
- OrgGateInfo[ i ][ ogID ] = CreateObject(OrgGateInfo[ i ][ ogObjID ], OrgGateInfo[ i ][ ogPosX ], OrgGateInfo[ i ][ ogPosY ], OrgGateInfo[ i ][ ogPosZ ], OrgGateInfo[ i ][ ogRotX ], OrgGateInfo[ i ][ ogRotY ], OrgGateInfo[ i ][ ogRotZ ]);
- SaveOrgGate(i);
- KreiraZatvorenu[ playerid ] = false;
- KreiraKapiju[ playerid ] = 0;
- SCM(playerid, -1, "Uspesno ste zavrsili kreiranje kapije.");
- }
- }
- if(response == EDIT_RESPONSE_FINAL && KreiraSef[ playerid ] != 0) {
- new i = KreiraSef[ playerid ];
- OrgInfo[ i ][ orgSefX ] = fX;
- OrgInfo[ i ][ orgSefY ] = fY;
- OrgInfo[ i ][ orgSefZ ] = fZ;
- OrgInfo[ i ][ orgSefRX ] = fRotX;
- OrgInfo[ i ][ orgSefRY ] = fRotY;
- OrgInfo[ i ][ orgSefRZ ] = fRotZ;
- DestroyObject(OrgInfo[ i ][ orgSefID ]);
- OrgInfo[ i ][ orgSefID ] = CreateObject(OrgInfo[ i ][ orgSefObjID ], fX, fY, fZ, fRotX, fRotY, fRotZ);
- OrgInfo[ i ][ orgSefLabel ] = Create3DTextLabel("~ {FFFFFF}/org {0057AE}~", 0x0057AEFF, fX, fY, fZ, 10.0, 0, 0);
- SaveOrg(i);
- KreiraSef[ playerid ] = 0;
- }
- return 1;
- }
- // Komande //
- YCMD:kreirajkapiju(playerid, params[], help) {
- new oid, objid, otime, ospeed, Float:X, Float:Y, Float:Z, i = NextKapijaID(MAX_ORGGATES);
- if(!IsPlayerAdmin(playerid)) return SCM(playerid, -1, "Niste ovlasceni.");
- if(sscanf(params, "dddd", oid, objid, otime, ospeed)) return SCM(playerid, -1, "/kreirajkapiju [ORG ID] [Object ID] [Vreme zatvaranja] [Brzina zatvaranja]");
- new oFile[ 60 ];
- format(oFile, sizeof(oFile), ORG_FILE, oid);
- if(!fexist(oFile)) return SCM(playerid, -1, "ID te organizacije ne postoji.");
- if(otime < 1 || otime > 20) return SCM(playerid, -1, "Vreme zatvaranja kapije ne moze biti manje od 1 ili vece od 20.");
- if(ospeed < 1 || ospeed > 10) return SCM(playerid, -1, "Brzina zatvaranja kapije ne moze biti manje od 1 ili vece od 10.");
- GetPlayerPos(playerid, X,Y,Z);
- OrgGateInfo[ i ][ ogID ] = CreateObject(objid, X, Y, Z, 0.0, 0.0, 0.0);
- EditObject(playerid, OrgGateInfo[ i ][ ogID ]);
- OrgGateInfo[ i ][ ogObjID ] = objid;
- OrgGateInfo[ i ][ ogOrgID ] = oid;
- OrgGateInfo[ i ][ ogVremeZ ] = otime;
- OrgGateInfo[ i ][ ogBrzinaZ ] = ospeed;
- KreiraKapiju[ playerid ] = i;
- return 1;
- }
- YCMD:izbrisikapiju(playerid, params[], help) {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Niste RCON admin.");
- new i = GetNearestOrgGate(playerid), gateFile[ 60 ];
- if(i == -1) return SendClientMessage(playerid, -1, "Niste u blizini kapije.");
- DestroyObject(OrgGateInfo[ i ][ ogID ]);
- OrgGateInfo[ i ][ ogPosX ] = 0.0;
- OrgGateInfo[ i ][ ogPosY ] = 0.0;
- OrgGateInfo[ i ][ ogPosZ ] = 0.0;
- OrgGateInfo[ i ][ ogRotX ] = 0.0;
- OrgGateInfo[ i ][ ogRotY ] = 0.0;
- OrgGateInfo[ i ][ ogRotZ ] = 0.0;
- format(gateFile, sizeof(gateFile), ORGGATES_FILE, i);
- if(fexist(gateFile)) { fremove(gateFile); }
- return 1;
- }
- YCMD:kreirajzonu(playerid, params[], help) {
- #pragma unused help
- new i, Float:X, Float:Y, Float:Z;
- if(sscanf(params, "d", i)) return SendClientMessage(playerid, -1, "/kreirajzonu [Org ID]");
- new oFile[ 60 ];
- format(oFile, sizeof(oFile), ORG_FILE, i);
- if(!fexist(oFile)) return SCM(playerid, -1, "ID te organizacije ne postoji.");
- GetPlayerPos(playerid, X,Y,Z);
- OrgInfo[ i ][ zMinX ] = X;
- OrgInfo[ i ][ zMinY ] = Y;
- KreiraZonu[ playerid ] = i;
- SCM(playerid, -1, "Idite do drugog kraja zone i pritisnite dugme Y.");
- return 1;
- }
- YCMD:makeleader(playerid, params[], help) {
- #pragma unused help
- if(!IsPlayerAdmin(playerid)) return SCM(playerid, -1, "Niste ovlasceni.");
- new id, oid, str[ 256 ], pname[ MAX_PLAYER_NAME ], pname1[ MAX_PLAYER_NAME ], oFile[ 60 ];
- if(sscanf(params, "ud", id, oid)) return SCM(playerid, -1, "/makeleader [ID] [ORG ID]");
- format(oFile, sizeof(oFile), ORG_FILE, oid);
- if(!fexist(oFile) && oid != 0) return SCM(playerid, -1, "ID te organizacije ne postoji.");
- GetPlayerName(playerid, pname, sizeof(pname));
- GetPlayerName(id, pname1, sizeof(pname1));
- if(oid == 0) {
- format(str, sizeof(str), "Admin %s Vam je skinuo lidera.", pname);
- SCM(id, -1, str);
- format(str, sizeof(str), "Skinuli ste igracu %s lidera.", pname1);
- SCM(playerid, -1, str);
- SetPlayerSkin(id, 1);
- if( strcmp( ImeIgraca(id), OrgInfo[ pLider[ playerid ] ][ orgLider1 ], true ) == 0) { strmid( OrgInfo[ pLider[ playerid ] ][ orgLider1 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME); OrgInfo[ pLider[ playerid ] ][ orgLiderSlot1 ] = false; }
- if( strcmp( ImeIgraca(id), OrgInfo[ pLider[ playerid ] ][ orgLider2 ], true ) == 0) { strmid( OrgInfo[ pLider[ playerid ] ][ orgLider2 ], "Niko", 0, strlen( "Niko" ), MAX_PLAYER_NAME ); OrgInfo[ pLider[ playerid ] ][ orgLiderSlot2 ] = false; }
- format( str, sizeof( str ),""col_srvboja"~ "col_white"%s"col_srvboja" ~\n "col_white"ID: "col_srvboja"%d \n "col_white"Br.Clanova:"col_srvboja" %d\n"col_white"Lider 1: "col_srvboja"%s\n"col_white"Lider 2: "col_srvboja"%s\n{FFFFFF}Za ulaz pritisnite - "col_srvboja"ENTER", OrgInfo[ pLider[ playerid ] ][ orgIme ],pLider[ playerid ],OrgInfo[ pLider[ playerid ] ][ orgClanovi ],OrgInfo[ pLider[ playerid ] ][ orgLider1 ],OrgInfo[ pLider[ playerid ] ][ orgLider2 ] );
- Update3DTextLabelText(OrgLabel[ pLider[ playerid ] ], OrgInfo[ pLider[ playerid ] ][ orgBoja ], str);
- SaveOrg(pLider[ id ]);
- pClan[ id ] = 0;
- pLider[ id ] = 0;
- }
- else {
- if( !strcmp( OrgInfo[ oid ][ orgLider1 ], "Niko", true ) ) { strmid( OrgInfo[ oid ][ orgLider1 ], ImeIgraca( id ), 0, strlen( ImeIgraca( id ) ), MAX_PLAYER_NAME ); }
- else if( !strcmp( OrgInfo[ oid ][ orgLider2 ], "Niko", true ) ) { strmid( OrgInfo[ oid ][ orgLider2 ], ImeIgraca( id ), 0, strlen( ImeIgraca( id ) ), MAX_PLAYER_NAME ); }
- else return SendClientMessage( playerid, -1, "Ova organizacija vec ima 2 lidera." );
- if(pLider[ id ] != 0) return SCM(playerid, -1, "Taj igrac je vec lider.");
- format(str, sizeof(str), "Admin %s Vam dao lidera organizacije %s.", pname, OrgInfo[ oid ][ orgIme ]);
- SCM(id, -1, str);
- format(str, sizeof(str), "Dali ste lidera igracu %s.", pname1);
- SCM(playerid, -1, str);
- pLider[ id ] = oid;
- if(!OrgInfo[ oid ][ orgLiderSlot1 ]) { if( !strcmp( OrgInfo[ oid ][ orgLider1 ], "Niko", true ) ) { strmid( OrgInfo[ oid ][ orgLider1 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); OrgInfo[ oid ][ orgLiderSlot1 ] = true; } }
- else if(OrgInfo[ oid ][ orgLiderSlot1 ] && !OrgInfo[ oid ][ orgLiderSlot2 ]) { if( !strcmp( OrgInfo[ oid ][ orgLider2 ], "Niko", true ) ) { strmid( OrgInfo[ oid ][ orgLider2 ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_PLAYER_NAME ); OrgInfo[ oid ][ orgLiderSlot2 ] = true; } }
- format( str, sizeof( str ),""col_srvboja"~ "col_white"%s"col_srvboja" ~\n "col_white"ID: "col_srvboja"%d \n "col_white"Br.Clanova:"col_srvboja" %d\n"col_white"Lider 1: "col_srvboja"%s\n"col_white"Lider 2: "col_srvboja"%s\n{FFFFFF}Za ulaz pritisnite - "col_srvboja"ENTER", OrgInfo[ oid ][ orgIme ],oid,OrgInfo[ oid ][ orgClanovi ],OrgInfo[ oid ][ orgLider1 ],OrgInfo[ oid ][ orgLider2 ] );
- Update3DTextLabelText(OrgLabel[ oid ], OrgInfo[ oid ][ orgBoja ], str);
- if(!OrgInfo[ oid ][ orgDrzavna ]) { if(!pZensko[ playerid ]) { SetPlayerSkin(playerid, OrgInfo[ oid ][ orgSkin5 ]); } else { SetPlayerSkin(playerid, OrgInfo[ oid ][ orgZSkin5 ]); } }
- SaveOrg(oid);
- pRank[ id ] = 5;
- pClan[ id ] = oid;
- }
- return 1;
- }
- YCMD:lider(playerid, params[], help) {
- #pragma unused help
- #pragma unused params
- if(pLider[ playerid ] == 0) return SendClientMessage(playerid, -1, "Niste lider.");
- ShowPlayerDialog(playerid, DIALOG_LIDERCMD, DIALOG_STYLE_LIST, "LIDER","Ubaci\nIzbaci\nIzbaci offline clana\nDodeli rank clanu\nInformacije o sefu\nUzmi iz sefa\nPokreni war","Izaberi","Odustani");
- return 1;
- }
- YCMD:f(playerid, params[], help) {
- #pragma unused help
- if(pClan[ playerid ] == 0) return SCM(playerid, -1, "Niste clan ni jedne organizacije.");
- new text[ 80 ], str[ 130 ], pname[ MAX_PLAYER_NAME ];
- GetPlayerName(playerid, pname, sizeof(pname));
- if(sscanf(params, "s[80]", text)) return SCM(playerid, -1, "/f [Text]");
- for(new i; i < MAX_PLAYERS; i++) {
- if(pRank[ playerid ] == 1) { format(str, sizeof(str), "%s %s - %s.", OrgInfo[ pClan[ playerid ] ][ orgRank1 ], pname, text); if(pClan[ i ] == pClan[ playerid ] || pLider[ i ] == pClan[ playerid ]) return SCM(i, -1, str); }
- else if(pRank[ playerid ] == 2) { format(str, sizeof(str), "%s %s - %s.", OrgInfo[ pClan[ playerid ] ][ orgRank2 ], pname, text); if(pClan[ i ] == pClan[ playerid ] || pLider[ i ] == pClan[ playerid ]) return SCM(i, -1, str); }
- else if(pRank[ playerid ] == 3) { format(str, sizeof(str), "%s %s - %s.", OrgInfo[ pClan[ playerid ] ][ orgRank3 ], pname, text); if(pClan[ i ] == pClan[ playerid ] || pLider[ i ] == pClan[ playerid ]) return SCM(i, -1, str); }
- else if(pRank[ playerid ] == 4) { format(str, sizeof(str), "%s %s - %s.", OrgInfo[ pClan[ playerid ] ][ orgRank4 ], pname, text); if(pClan[ i ] == pClan[ playerid ] || pLider[ i ] == pClan[ playerid ]) return SCM(i, -1, str); }
- else if(pRank[ playerid ] == 5) { format(str, sizeof(str), "%s %s - %s.", OrgInfo[ pClan[ playerid ] ][ orgRank5 ], pname, text); if(pClan[ i ] == pClan[ playerid ] || pLider[ i ] == pClan[ playerid ]) return SCM(i, -1, str); }
- }
- return 1;
- }
- YCMD:sf(playerid, params[], help) {
- new oid = pClan[ playerid ], si = OrgInfo[ pClan[ playerid ] ][ orgUSavezu ];
- if(pClan[ playerid ] == 0) return SCM(playerid, -1, "Niste clan ni jedne organizacije.");
- if(OrgInfo[ oid ][ orgUSavezu ] == 0) return SCM(playerid, -1, "Vasa organizacija nema saveznika.");
- new text[ 80 ], str[ 130 ], pname[ MAX_PLAYER_NAME ];
- GetPlayerName(playerid, pname, sizeof(pname));
- if(sscanf(params, "s[80]", text)) return SCM(playerid, -1, "/sf [Text]");
- for(new i; i < MAX_PLAYERS; i++) {
- if(pRank[ playerid ] == 1) { format(str, sizeof(str), "%s %s - %s.", OrgInfo[ pClan[ playerid ] ][ orgRank1 ], pname, text); if(pClan[ i ] == pClan[ playerid ] || pLider[ i ] == pClan[ playerid ] || pClan[ i ] == si || pLider[ i ] == si) return SCM(i, -1, str); }
- else if(pRank[ playerid ] == 2) { format(str, sizeof(str), "%s %s - %s.", OrgInfo[ pClan[ playerid ] ][ orgRank2 ], pname, text); if(pClan[ i ] == pClan[ playerid ] || pLider[ i ] == pClan[ playerid ] || pClan[ i ] == si || pLider[ i ] == si) return SCM(i, -1, str); }
- else if(pRank[ playerid ] == 3) { format(str, sizeof(str), "%s %s - %s.", OrgInfo[ pClan[ playerid ] ][ orgRank3 ], pname, text); if(pClan[ i ] == pClan[ playerid ] || pLider[ i ] == pClan[ playerid ] || pClan[ i ] == si || pLider[ i ] == si) return SCM(i, -1, str); }
- else if(pRank[ playerid ] == 4) { format(str, sizeof(str), "%s %s - %s.", OrgInfo[ pClan[ playerid ] ][ orgRank4 ], pname, text); if(pClan[ i ] == pClan[ playerid ] || pLider[ i ] == pClan[ playerid ] || pClan[ i ] == si || pLider[ i ] == si) return SCM(i, -1, str); }
- else if(pRank[ playerid ] == 5) { format(str, sizeof(str), "%s %s - %s.", OrgInfo[ pClan[ playerid ] ][ orgRank5 ], pname, text); if(pClan[ i ] == pClan[ playerid ] || pLider[ i ] == pClan[ playerid ] || pClan[ i ] == si || pLider[ i ] == si) return SCM(i, -1, str); }
- }
- return 1;
- }
- YCMD:org(playerid, params[], help) {
- #pragma unused help
- #pragma unused params
- if(pClan[ playerid ] == 0) return SCM(playerid, -1, "Niste clan ni jedne organizacije.");
- ShowPlayerDialog(playerid, DIALOG_ORGCMD, DIALOG_STYLE_LIST, "ORGANIZACIJA","Lociraj organizaciju\nLociraj hangar\nClanovi organizacije\nOstavi u sef","Izaberi","Odustani");
- return 1;
- }
- YCMD:duty(playerid, params[], help) {
- if(pClan[ playerid ] == 0 || !OrgInfo[ pClan[ playerid ] ][ orgDrzavna ]) return SCM(playerid, -1, "Niste policajac.");
- if(!IsPlayerInRangeOfPoint(playerid, 3.0, OrgInfo[ pClan[ playerid ] ][ orgPDDutyX ], OrgInfo[ pClan[ playerid ] ][ orgPDDutyY ], OrgInfo[ pClan[ playerid ] ][ orgPDDutyZ ])) return SCM(playerid, -1, "Niste kod ormarica za uzimanje duznosti.");
- if(!PoliceDuty[ playerid ]) {
- if(pRank[ playerid ] == 0) return SCM(playerid, -1, "Suspendovani ste.");
- StariSkin[ playerid ] = GetPlayerSkin(playerid);
- SetPlayerColor(playerid, 0x2641FE00);
- PoliceDuty[ playerid ] = true;
- GivePlayerWeapon(playerid, 3, 500);
- GivePlayerWeapon(playerid, 24, 100);
- SetPlayerArmour(playerid, 100);
- SetPlayerHealth(playerid, 99);
- if(pRank[ playerid ] == 1) { SetPlayerSkin(playerid, OrgInfo[ pClan[ playerid ] ][ orgSkin1 ]); }
- else if(pRank[ playerid ] == 2) { SetPlayerSkin(playerid, OrgInfo[ pClan[ playerid ] ][ orgSkin2 ]); }
- else if(pRank[ playerid ] == 3) { SetPlayerSkin(playerid, OrgInfo[ pClan[ playerid ] ][ orgSkin3 ]); }
- else if(pRank[ playerid ] == 4) { SetPlayerSkin(playerid, OrgInfo[ pClan[ playerid ] ][ orgSkin4 ]); }
- else if(pRank[ playerid ] == 5) { SetPlayerSkin(playerid, OrgInfo[ pClan[ playerid ] ][ orgSkin5 ]); }
- for(new i; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(pClan[ i ] == pClan[ playerid ]) { new str[ 60 ]; format(str, sizeof(str), "%s se prijavljuje na duznost.", ImeIgraca(playerid)); } } }
- // Stavi onu radius poruku da je uzeo duznost i to
- }
- else {
- ResetPlayerWeapons(playerid);
- PoliceDuty[ playerid ] = false;
- SetPlayerArmour(playerid, 0);
- SetPlayerHealth(playerid, 99);
- for(new i; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(pClan[ i ] == pClan[ playerid ] || pClan[ i ] == pLider[ playerid ] || pLider[ i ] == pClan[ playerid ] || pLider[ i ] == pLider[ playerid ]) { new str[ 60 ]; format(str, sizeof(str), "%s se odjavljuje sa duznosti.", ImeIgraca(playerid)); } } }
- SetPlayerColor(playerid, 0xFFFFFF00);
- SetPlayerSkin(playerid, StariSkin[ playerid ]);
- }
- return 1;
- }
- YCMD:kreirajorg(playerid, params[], help) {
- #pragma unused help
- #pragma unused params
- if(!IsPlayerAdmin(playerid)) return SCM(playerid, -1, "Niste ovlasceni.");
- SPD(playerid, DIALOG_ORGCREATE, DIALOG_STYLE_INPUT, "ORG Kreiranje","Upisite ime organizacije.\nMax 30 slova.","Dalje","Izlaz");
- return 1;
- }
- YCMD:kreirajsef(playerid, params[], help) {
- new oid, objid, Float:X, Float:Y, Float:Z;
- if(!IsPlayerAdmin(playerid)) return SCM(playerid, -1, "Niste RCON admin.");
- if(sscanf(params, "dd", oid, objid)) return SCM(playerid, -1, "/kreirajsef [ORG ID] [Object ID]");
- new oFile[ 60 ];
- format(oFile, sizeof(oFile), ORG_FILE, oid);
- if(!fexist(oFile)) return SCM(playerid, -1, "ID te organizacije ne postoji.");
- GetPlayerPos(playerid, X,Y,Z);
- OrgInfo[ oid ][ orgSefID ] = CreateObject(objid, X,Y,Z, 0.0, 0.0, 0.0);
- EditObject(playerid, OrgInfo[ oid ][ orgSefID ]);
- OrgInfo[ oid ][ orgSefObjID ] = objid;
- KreiraSef[ playerid ] = oid;
- SCM(playerid, -1, "Sacuvajte pozicije sefa.");
- return 1;
- }
- YCMD:kreirajpdduty(playerid, params[], help) {
- new oid, Float:X, Float:Y, Float:Z;
- if(!IsPlayerAdmin(playerid)) return SCM(playerid, -1, "Niste RCON admin.");
- if(sscanf(params, "d", oid)) return SCM(playerid, -1, "/kreirajpdduty [ORG ID]");
- new oFile[ 60 ];
- format(oFile, sizeof(oFile), ORG_FILE, oid);
- if(!fexist(oFile)) return SCM(playerid, -1, "ID te organizacije ne postoji.");
- GetPlayerPos(playerid, X,Y,Z);
- OrgInfo[ oid ][ orgPDDutyPickup ] = CreatePickup(1247, 1, X, Y, Z, 0);
- OrgInfo[ oid ][ orgPDDutyLabel ] = Create3DTextLabel("~ {FFFFFF}/duty {0057AE}~", 0x0057AEFF, X, Y, Z, 10.0, 0, 0);
- OrgInfo[ oid ][ orgPDDutyX ] = X;
- OrgInfo[ oid ][ orgPDDutyY ] = Y;
- OrgInfo[ oid ][ orgPDDutyZ ] = Z;
- SaveOrg(oid);
- return 1;
- }
- YCMD:kreirajpdopremu(playerid, params[], help) {
- new oid, Float:X, Float:Y, Float:Z;
- if(!IsPlayerAdmin(playerid)) return SCM(playerid, -1, "Niste RCON admin.");
- if(sscanf(params, "d", oid)) return SCM(playerid, -1, "/kreirajpdopremu [ORG ID]");
- new oFile[ 60 ];
- format(oFile, sizeof(oFile), ORG_FILE, oid);
- if(!fexist(oFile)) return SCM(playerid, -1, "ID te organizacije ne postoji.");
- GetPlayerPos(playerid, X,Y,Z);
- OrgInfo[ oid ][ orgGunPickup ] = CreatePickup(1239, 1, X, Y, Z, 0);
- OrgInfo[ oid ][ orgGunLabel ] = Create3DTextLabel("~ {FFFFFF}/uzmiopremu {0057AE}~", 0x0057AEFF, X, Y, Z, 10.0, 0, 0);
- OrgInfo[ oid ][ orgGunX ] = X;
- OrgInfo[ oid ][ orgGunY ] = Y;
- OrgInfo[ oid ][ orgGunZ ] = Z;
- SaveOrg(oid);
- return 1;
- }
- YCMD:uzmiopremu(playerid, params[], help) {
- new i = pClan[ playerid ];
- if(i == 0 || !OrgInfo[ i ][ orgDrzavna ]) return SCM(playerid, -1, "Niste policajac.");
- if(!PoliceDuty[ playerid ] && pRank[ playerid ] != 0) return SCM(playerid, -1, "Niste na duznosti.");
- if(UzeoOpremu[ playerid ]) return SCM(playerid, -1, "Vec ste uzeli opremu.");
- if(!IsPlayerInRangeOfPoint(playerid, 3.0, OrgInfo[ i ][ orgGunX ], OrgInfo[ i ][ orgGunY ], OrgInfo[ i ][ orgGunZ ])) return SCM(playerid, -1, "Niste kod ormarica za uzimanje opreme.");
- if(pRank[ playerid ] == 0) { ShowPlayerDialog(playerid, DIALOG_UZMIOPREMU, DIALOG_STYLE_LIST, "OPREMA","Suspend (Pendrek)","U redu","Izlaz"); }
- if(pRank[ playerid ] == 1) { ShowPlayerDialog(playerid, DIALOG_UZMIOPREMU, DIALOG_STYLE_LIST, "OPREMA","Kadet","U redu","Izlaz"); }
- if(pRank[ playerid ] == 2) { ShowPlayerDialog(playerid, DIALOG_UZMIOPREMU, DIALOG_STYLE_LIST, "OPREMA","Kadet\nPolicajac","U redu","Izlaz"); }
- if(pRank[ playerid ] == 3) { ShowPlayerDialog(playerid, DIALOG_UZMIOPREMU, DIALOG_STYLE_LIST, "OPREMA","Kadet\nPolicajac\nInspektor","U redu","Izlaz"); }
- if(pRank[ playerid ] == 4) { ShowPlayerDialog(playerid, DIALOG_UZMIOPREMU, DIALOG_STYLE_LIST, "OPREMA","Kadet\nPolicajac\nInspektor\nDirektor","U redu","Izlaz"); }
- if(pRank[ playerid ] == 5) { ShowPlayerDialog(playerid, DIALOG_UZMIOPREMU, DIALOG_STYLE_LIST, "OPREMA","Kadet\nPolicajac\nInspektor\nDirektor\nNacelnik","U redu","Izlaz"); }
- return 1;
- }
- YCMD:kreirajhapsenje(playerid, params[], help) {
- new oid, Float:X, Float:Y, Float:Z;
- if(!IsPlayerAdmin(playerid)) return SCM(playerid, -1, "Niste RCON admin.");
- if(sscanf(params, "d", oid)) return SCM(playerid, -1, "/kreirajhapsenje [ORG ID]");
- new oFile[ 60 ];
- format(oFile, sizeof(oFile), ORG_FILE, oid);
- if(!fexist(oFile)) return SCM(playerid, -1, "ID te organizacije ne postoji.");
- GetPlayerPos(playerid, X,Y,Z);
- OrgInfo[ oid ][ orgHapsenjePickup ] = CreatePickup(1239, 1, X, Y, Z, 0);
- OrgInfo[ oid ][ orgHapsenjeLabel ] = Create3DTextLabel("~ {FFFFFF}/arrest {0057AE}~", 0x0057AEFF, X, Y, Z, 10.0, 0, 0);
- OrgInfo[ oid ][ orgHapsenjeX ] = X;
- OrgInfo[ oid ][ orgHapsenjeY ] = Y;
- OrgInfo[ oid ][ orgHapsenjeZ ] = Z;
- SaveOrg(oid);
- return 1;
- }
- YCMD:arrest(playerid, params[], help) {
- new i = pClan[ playerid ], id, str[ 200 ], Float:X, Float:Y, Float:Z;
- if(i == 0 || !OrgInfo[ i ][ orgDrzavna ]) return SCM(playerid, -1, "Niste policajac.");
- if(sscanf(params, "u", id)) return SCM(playerid, -1, "/arrest [ID]");
- if(!IsPlayerConnected(id)) return SCM(playerid, -1, "Taj igrac nije na serveru.");
- //if(id == playerid) return SCM(playerid, -1, "Ne mozete uhapsiti sami sebe.");
- if(!IsPlayerInRangeOfPoint(playerid, 3.0, OrgInfo[ i ][ orgHapsenjeX ], OrgInfo[ i ][ orgHapsenjeY ], OrgInfo[ i ][ orgHapsenjeZ ])) return SCM(playerid, -1, "Niste kod mesta za hapsenje.");
- GetPlayerPos(id, X,Y,Z);
- if(!IsPlayerInRangeOfPoint(playerid, 5.0, X,Y,Z)) return SCM(playerid, -1, "Taj igrac nije blizu Vas.");
- if(pWanted[ id ] < 1) return SCM(playerid, -1, "Taj igrac nema Wanted Level.");
- pZatvorVreme[ id ] = pWanted[ id ]*300000;
- ZatvorTimer[ id ] = SetTimerEx("TimerZatvor", 1000, true, "i", id);
- // SetPlayerPos(id, X,Y,Z); // ZATVOR
- format(str, sizeof(str), "Vreme zatvora: %d sekundi.", pZatvorVreme[ id ]/1000);
- SCM(id, -1, str);
- format(str, sizeof(str), "[VESTI] {FFFFFF}%s je uhapsen od strane policajca %s.", ImeIgraca(id), ImeIgraca(playerid));
- SendClientMessageToAll(0x0057AEFF, str);
- return 1;
- }
- YCMD:test(playerid, params[], help) return pWanted[ playerid ] = 1;
- YCMD:zauzmi(playerid, params[], help) {
- #pragma unused help
- #pragma unused params
- if(Zauzima[ playerid ] != 0) return SCM(playerid, -1, "Vec zauzimate.");
- for(new i; i < MAX_ORGS; i++) {
- if(IsPlayerInRangeOfPoint(playerid, 3.0, OrgInfo[ i ][ pPosX ], OrgInfo[ i ][ pPosY ], OrgInfo[ i ][ pPosZ ])) {
- if(pClan[ playerid ] == OrgInfo[ i ][ orgZauzeta ]) return SCM(playerid, -1, "Hoces da zauzmes svoju zonu?");
- if(pClan[ playerid ] == 0) return SCM(playerid, -1, "Niste clan ni jedne organizacije.");
- if(OrgInfo[ pClan[ playerid ] ][ orgMafija ] || OrgInfo[ pClan[ playerid ] ][ orgDrzavna ]) return SCM(playerid, -1, "Mafije i drzavne organizacije ne mogu zauzimati.");
- ZauzimanjeTimer[ playerid ] = SetTimerEx("ZauzimanjeVreme", 600000, false, "i", playerid);
- SCM(playerid, -1, "Krenuli ste da zauzimate, sacekajte 10 minuta.");
- ApplyAnimation(playerid, "BOMBER","BOM_Plant_Loop",4.0,1,0,0,1,0);
- TogglePlayerControllable(playerid, false);
- Zauzima[ playerid ] = i;
- for(new o; o < MAX_PLAYERS; o++) {
- if(pClan[ o ] == OrgInfo[ i ][ orgZauzeta ] || pLider[ o ] == OrgInfo[ i ][ orgZauzeta ]) { SCM(playerid, -1, "Neko pokusava da vam zauzme zonu !"); }
- }
- }
- }
- return 1;
- }
- YCMD:savez(playerid, params[], help) {
- #pragma unused help
- new id, str[ 100 ];
- if(pLider[ playerid ] == 0) return SCM(playerid, -1, "Niste lider.");
- if(sscanf(params, "u", id)) return SCM(playerid, -1, "/savez [ID/Ime igraca]");
- if(CekaSavez[ playerid ]) return SCM(playerid, -1, "Vec imate zahtev za savez na cekanju.");
- if(pLider[ id ] == 0) return SCM(playerid, -1, "Taj igrac nije lider.");
- if(OrgInfo[ pLider[ playerid ] ][ orgUSavezu ] != 0) return SCM(playerid, -1, "Vec imate saveznika.");
- if(OrgInfo[ pLider[ id ] ][ orgUSavezu ] != 0) return SCM(playerid, -1, "Taj lider vec ima saveznika.");
- if(id == playerid) return SCM(playerid, -1, "Kako da posaljete sebi zahtev za savez?");
- if(pLider[ id ] == pLider[ playerid ]) return SCM(playerid, -1, "Taj igrac je lider Vase organizacije.");
- if(OrgInfo[ pLider[ playerid ] ][ orgBanda ] && OrgInfo[ pLider[ id ] ][ orgBanda ]) return SCM(playerid, -1, "Bande mogu sklopiti savez samo sa mafijom.");
- if(OrgInfo[ pLider[ playerid ] ][ orgMafija ] && OrgInfo[ pLider[ id ] ][ orgMafija ]) return SCM(playerid, -1, "Mafije mogu sklopiti savez samo sa bandom.");
- if(OrgInfo[ pLider[ id ] ][ orgDrzavna ] || OrgInfo[ pLider[ playerid ] ][ orgDrzavna ]) return SCM(playerid, -1, "Drzavne organizacije ne mogu imati saveznike.");
- format(str, sizeof(str), "Igrac %s, lider organizacije %s\nVam salje zahtev za savez.", ImeIgraca(playerid), OrgInfo[ pLider[ playerid ] ][ orgIme ]);
- ShowPlayerDialog(id, DIALOG_SAVEZ, DIALOG_STYLE_MSGBOX, "ZAHTEV ZA SAVEZ", str, "Prihvati","Odbij");
- PoslaoSavez[ id ] = playerid;
- CekaSavez[ playerid ] = true;
- return 1;
- }
- YCMD:kreirajorgveh(playerid, params[], help) {
- #pragma unused help
- if(!IsPlayerAdmin(playerid)) return SCM(playerid, -1, "Niste ovlasceni.");
- new oid, vehid, b1, b2, i = NextOrgVehID(MAX_ORGVEHS), Float:X, Float:Y, Float:Z, Float:A, ovFile[ 60 ], str[ 35 ];
- if(sscanf(params, "dddd", oid, vehid, b1, b2)) return SCM(playerid, -1, "/kreirajorgveh [ID ORG] [ID Vozila] [Boja 1] [Boja 2]");
- format(ovFile, sizeof(ovFile), ORG_FILE, oid);
- if(!fexist(ovFile)) return SCM(playerid, -1, "ID te organizacije ne postoji.");
- if(vehid < 400 || vehid > 611) return SCM(playerid, -1, "ID Vozila : 400 - 611");
- format(str, sizeof(str), "[ %s ]", OrgInfo[ oid ][ orgIme ]);
- GetPlayerPos(playerid, X,Y,Z); GetPlayerFacingAngle(playerid, A);
- OrgVehInfo[ i ][ ovID ] = CreateVehicle(vehid, X, Y, Z, A, b1, b2, -1);
- OrgVehLabel[ i ] = Create3DTextLabel(str, OrgInfo[ oid ][ orgBoja ], X,Y,Z, 15.0, 0, 0);
- Attach3DTextLabelToVehicle(OrgVehLabel[ i ], OrgVehInfo[ i ][ ovID ], 0.0, 0.0, 0.0);
- OrgVehInfo[ i ][ ovModel ] = vehid;
- OrgVehInfo[ i ][ ovBoja1 ] = b1;
- OrgVehInfo[ i ][ ovBoja2 ] = b2;
- OrgVehInfo[ i ][ ovOrgID ] = oid;
- OrgVehInfo[ i ][ ovPosX ] = X;
- OrgVehInfo[ i ][ ovPosY ] = Y;
- OrgVehInfo[ i ][ ovPosZ ] = Z;
- OrgVehInfo[ i ][ ovRotA ] = A;
- TipVozila[ i ] = 1;
- SaveOrgVeh(i);
- PutPlayerInVehicle(playerid, OrgVehInfo[ i ][ ovID ], 0);
- return 1;
- }
- stock NextOrgVehID(const len) {
- new id = (-1);
- for( new loop = ( 0 ), provjera = ( -1 ), Data_[ 64 ] = "\0"; loop != len; ++ loop ) {
- provjera = ( loop+1 );
- format( Data_, ( sizeof Data_ ), ORGVEH_FILE, provjera );
- if(!fexist(Data_)) {
- id = ( provjera );
- break; } }
- return ( id );
- }
- stock NextORGID(const len) {
- new id = (-1);
- for( new loop = ( 0 ), provjera = ( -1 ), Data_[ 64 ] = "\0"; loop != len; ++ loop ) {
- provjera = ( loop+1 );
- format( Data_, ( sizeof Data_ ), ORG_FILE, provjera );
- if(!fexist(Data_)) {
- id = ( provjera );
- break; } }
- return ( id );
- }
- stock NextKapijaID(const len) {
- new id = (-1);
- for( new loop = ( 0 ), provjera = ( -1 ), Data_[ 64 ] = "\0"; loop != len; ++ loop ) {
- provjera = ( loop+1 );
- format( Data_, ( sizeof Data_ ), ORGGATES_FILE, provjera );
- if(!fexist(Data_)) {
- id = ( provjera );
- break; } }
- return ( id );
- }
- GetNearestOrgGate( playerid ) {
- for( new i = 1; i < MAX_ORGGATES; i++) {
- if( IsPlayerInRangeOfPoint( playerid, 6.0, OrgGateInfo[ i ][ ogPosX ], OrgGateInfo[ i ][ ogPosY ], OrgGateInfo[ i ][ ogPosZ ] ) ) { return i; }
- }
- return -1;
- }
- stock SaveOrgGate(id) {
- new ogFile[ 60 ];
- format(ogFile, sizeof(ogFile), ORGGATES_FILE, id);
- new INI:File = INI_Open(ogFile);
- INI_WriteInt(File, "ORG_ID", OrgGateInfo[ id ][ ogOrgID ]);
- INI_WriteInt(File, "Object_ID", OrgGateInfo[ id ][ ogObjID ]);
- INI_WriteFloat(File, "Lokacija_X", OrgGateInfo[ id ][ ogPosX ]);
- INI_WriteFloat(File, "Lokacija_Y", OrgGateInfo[ id ][ ogPosY ]);
- INI_WriteFloat(File, "Lokacija_Z", OrgGateInfo[ id ][ ogPosZ ]);
- INI_WriteFloat(File, "Rotacija_X", OrgGateInfo[ id ][ ogRotX ]);
- INI_WriteFloat(File, "Rotacija_Y", OrgGateInfo[ id ][ ogRotY ]);
- INI_WriteFloat(File, "Rotacija_Z", OrgGateInfo[ id ][ ogRotZ ]);
- INI_WriteFloat(File, "Otvorena_X", OrgGateInfo[ id ][ oogPosX ]);
- INI_WriteFloat(File, "Orvorena_Y", OrgGateInfo[ id ][ oogPosY ]);
- INI_WriteFloat(File, "Otvorena_Z", OrgGateInfo[ id ][ oogPosZ ]);
- INI_WriteFloat(File, "Otvorena_RX", OrgGateInfo[ id ][ oogRotX ]);
- INI_WriteFloat(File, "Otvorena_RY", OrgGateInfo[ id ][ oogRotY ]);
- INI_WriteFloat(File, "Otvorena_RZ", OrgGateInfo[ id ][ oogRotZ ]);
- INI_WriteInt(File, "Vreme_Zatvaranja", OrgGateInfo[ id ][ ogVremeZ ]);
- INI_WriteInt(File, "Brzina_Zatvaranja", OrgGateInfo[ id ][ ogBrzinaZ ]);
- INI_Close(File);
- }
- stock SaveOrgVeh(id) {
- new ovFile[ 60 ];
- format(ovFile, sizeof(ovFile), ORGVEH_FILE, id);
- new INI:File = INI_Open(ovFile);
- INI_WriteInt(File, "Organizacija_ID", OrgVehInfo[ id ][ ovOrgID ]);
- INI_WriteInt(File, "Model", OrgVehInfo[ id ][ ovModel ]);
- INI_WriteFloat(File, "Lokacija_X", OrgVehInfo[ id ][ ovPosX ]);
- INI_WriteFloat(File, "Lokacija_Y", OrgVehInfo[ id ][ ovPosY ]);
- INI_WriteFloat(File, "Lokacija_Z", OrgVehInfo[ id ][ ovPosZ ]);
- INI_WriteFloat(File, "Rotacija_A", OrgVehInfo[ id ][ ovRotA ]);
- INI_WriteInt(File, "Boja_1", OrgVehInfo[ id ][ ovBoja1 ]);
- INI_WriteInt(File, "Boja_2", OrgVehInfo[ id ][ ovBoja2 ]);
- INI_Close(File);
- }
- stock SaveOrg(id) {
- new oFile[ 60 ];
- format(oFile, sizeof(oFile), ORG_FILE, id);
- new INI:File = INI_Open(oFile);
- INI_WriteString(File, "Ime", OrgInfo[ id ][ orgIme ]);
- INI_WriteString(File, "Skracenica", OrgInfo[ id ][ orgSkracenica ]);
- INI_WriteBool(File, "Banda",OrgInfo[ id ][ orgBanda ]);
- INI_WriteBool(File, "Mafija",OrgInfo[ id ][ orgMafija ]);
- INI_WriteBool(File, "Drzavna",OrgInfo[ id ][ orgDrzavna ]);
- INI_WriteInt(File, "Interior_ID", OrgInfo[ id ][ orgInt ]);
- INI_WriteInt(File, "Virtual_World", OrgInfo[ id ][ orgVW ]);
- INI_WriteInt(File, "Savezna_Org_ID", OrgInfo[ id ][ orgUSavezu ]);
- INI_WriteHex(File, "Boja", OrgInfo[ id ][ orgBoja ]);
- INI_WriteHex(File, "Boja_Zone", OrgInfo[ id ][ zBoja ]);
- INI_WriteInt(File, "Clanovi", OrgInfo[ id ][ orgClanovi ]);
- INI_WriteBool(File, "Lider_Slot_1", OrgInfo[ id ][ orgLiderSlot1 ]);
- INI_WriteBool(File, "Lider_Slot_2", OrgInfo[ id ][ orgLiderSlot2 ]);
- INI_WriteString(File, "Rank_1", OrgInfo[ id ][ orgRank1 ]);
- INI_WriteString(File, "Rank_2", OrgInfo[ id ][ orgRank2 ]);
- INI_WriteString(File, "Rank_3", OrgInfo[ id ][ orgRank3 ]);
- INI_WriteString(File, "Rank_4", OrgInfo[ id ][ orgRank4 ]);
- INI_WriteString(File, "Rank_5", OrgInfo[ id ][ orgRank5 ]);
- INI_WriteInt(File, "Skin_Rank_1", OrgInfo[ id ][ orgSkin1 ]);
- INI_WriteInt(File, "Skin_Rank_2", OrgInfo[ id ][ orgSkin2 ]);
- INI_WriteInt(File, "Skin_Rank_3", OrgInfo[ id ][ orgSkin3 ]);
- INI_WriteInt(File, "Skin_Rank_4", OrgInfo[ id ][ orgSkin4 ]);
- INI_WriteInt(File, "Skin_Rank_5", OrgInfo[ id ][ orgSkin5 ]);
- INI_WriteInt(File, "Zenski_Skin_1", OrgInfo[ id ][ orgZSkin1 ]);
- INI_WriteInt(File, "Zenski_Skin_2", OrgInfo[ id ][ orgZSkin2 ]);
- INI_WriteInt(File, "Zenski_Skin_3", OrgInfo[ id ][ orgZSkin3 ]);
- INI_WriteInt(File, "Zenski_Skin_4", OrgInfo[ id ][ orgZSkin4 ]);
- INI_WriteInt(File, "Zenski_Skin_5", OrgInfo[ id ][ orgZSkin5 ]);
- INI_WriteFloat(File, "Lokacija_X", OrgInfo[ id ][ orgPosX ]);
- INI_WriteFloat(File, "Lokacija_Y", OrgInfo[ id ][ orgPosY ]);
- INI_WriteFloat(File, "Lokacija_Z", OrgInfo[ id ][ orgPosZ ]);
- INI_WriteFloat(File, "Interior_X", OrgInfo[ id ][ intPosX ]);
- INI_WriteFloat(File, "Interior_Y", OrgInfo[ id ][ intPosY ]);
- INI_WriteFloat(File, "Interior_Z", OrgInfo[ id ][ intPosZ ]);
- INI_WriteFloat(File, "Zona_Min_X", OrgInfo[ id ][ zMinX ]);
- INI_WriteFloat(File, "Zona_Min_Y", OrgInfo[ id ][ zMinY ]);
- INI_WriteFloat(File, "Zona_Max_X", OrgInfo[ id ][ zMaxX ]);
- INI_WriteFloat(File, "Zona_Max_Y", OrgInfo[ id ][ zMaxY ]);
- INI_WriteFloat(File, "Zauzimanje_X", OrgInfo[ id ][ pPosX ]);
- INI_WriteFloat(File, "Zauzimanje_Y", OrgInfo[ id ][ pPosY ]);
- INI_WriteFloat(File, "Zauzimanje_Z", OrgInfo[ id ][ pPosZ ]);
- INI_WriteInt(File, "ORG_Zauzeta", OrgInfo[ id ][ orgZauzeta ]);
- INI_WriteFloat(File, "Sef_X", OrgInfo[ id ][ orgSefX ]);
- INI_WriteFloat(File, "Sef_Y", OrgInfo[ id ][ orgSefY ]);
- INI_WriteFloat(File, "Sef_Z", OrgInfo[ id ][ orgSefZ ]);
- INI_WriteFloat(File, "Sef_RX", OrgInfo[ id ][ orgSefRX ]);
- INI_WriteFloat(File, "Sef_RY", OrgInfo[ id ][ orgSefRY ]);
- INI_WriteFloat(File, "Sef_RZ", OrgInfo[ id ][ orgSefRZ ]);
- INI_WriteInt(File, "Sef_ObjID", OrgInfo[ id ][ orgSefObjID ]);
- INI_WriteInt(File, "Kolicina_Novca", OrgInfo[ id ][ orgSefNovac ]);
- INI_WriteInt(File, "Kolicina_Materijala", OrgInfo[ id ][ orgSefMats ]);
- INI_WriteInt(File, "Kolicina_Droge", OrgInfo[ id ][ orgSefDroga ]);
- INI_WriteFloat(File, "PDDuty_X", OrgInfo[ id ][ orgPDDutyX ]);
- INI_WriteFloat(File, "PDDuty_Y", OrgInfo[ id ][ orgPDDutyY ]);
- INI_WriteFloat(File, "PDDuty_Z", OrgInfo[ id ][ orgPDDutyZ ]);
- INI_WriteFloat(File, "Gun_X", OrgInfo[ id ][ orgGunX ]);
- INI_WriteFloat(File, "Gun_Y", OrgInfo[ id ][ orgGunY ]);
- INI_WriteFloat(File, "Gun_Z", OrgInfo[ id ][ orgGunZ ]);
- INI_WriteFloat(File, "Hapsenje_X", OrgInfo[ id ][ orgHapsenjeX ]);
- INI_WriteFloat(File, "Hapsenje_Y", OrgInfo[ id ][ orgHapsenjeY ]);
- INI_WriteFloat(File, "Hapsenje_Z", OrgInfo[ id ][ orgHapsenjeZ ]);
- INI_WriteString(File, "Lider_1", OrgInfo[ id ][ orgLider1 ]);
- INI_WriteString(File, "Lider_2", OrgInfo[ id ][ orgLider2 ]);
- INI_WriteString(File, "Clan_1", OrgInfo[ id ][ orgClan1 ]);
- INI_WriteString(File, "Clan_2", OrgInfo[ id ][ orgClan2 ]);
- INI_WriteString(File, "Clan_3", OrgInfo[ id ][ orgClan3 ]);
- INI_WriteString(File, "Clan_4", OrgInfo[ id ][ orgClan4 ]);
- INI_WriteString(File, "Clan_5", OrgInfo[ id ][ orgClan5 ]);
- INI_WriteString(File, "Clan_6", OrgInfo[ id ][ orgClan6 ]);
- INI_WriteString(File, "Clan_7", OrgInfo[ id ][ orgClan7 ]);
- INI_WriteString(File, "Clan_8", OrgInfo[ id ][ orgClan8 ]);
- INI_WriteString(File, "Clan_9", OrgInfo[ id ][ orgClan9 ]);
- INI_WriteString(File, "Clan_10", OrgInfo[ id ][ orgClan10 ]);
- INI_WriteString(File, "Clan_11", OrgInfo[ id ][ orgClan11 ]);
- INI_WriteString(File, "Clan_12", OrgInfo[ id ][ orgClan12 ]);
- INI_WriteString(File, "Clan_13", OrgInfo[ id ][ orgClan13 ]);
- INI_WriteString(File, "Clan_14", OrgInfo[ id ][ orgClan14 ]);
- INI_WriteString(File, "Clan_15", OrgInfo[ id ][ orgClan15 ]);
- INI_WriteString(File, "Clan_16", OrgInfo[ id ][ orgClan16 ]);
- INI_WriteString(File, "Clan_17", OrgInfo[ id ][ orgClan17 ]);
- INI_WriteString(File, "Clan_18", OrgInfo[ id ][ orgClan18 ]);
- INI_WriteString(File, "Clan_19", OrgInfo[ id ][ orgClan19 ]);
- INI_WriteString(File, "Clan_20", OrgInfo[ id ][ orgClan20 ]);
- INI_WriteString(File, "Clan_21", OrgInfo[ id ][ orgClan21 ]);
- INI_WriteString(File, "Clan_22", OrgInfo[ id ][ orgClan22 ]);
- INI_WriteString(File, "Clan_23", OrgInfo[ id ][ orgClan23 ]);
- INI_WriteString(File, "Clan_24", OrgInfo[ id ][ orgClan24 ]);
- INI_WriteString(File, "Clan_25", OrgInfo[ id ][ orgClan25 ]);
- INI_WriteString(File, "Clan_26", OrgInfo[ id ][ orgClan26 ]);
- INI_WriteString(File, "Clan_27", OrgInfo[ id ][ orgClan27 ]);
- INI_WriteString(File, "Clan_28", OrgInfo[ id ][ orgClan28 ]);
- INI_WriteString(File, "Clan_29", OrgInfo[ id ][ orgClan29 ]);
- INI_WriteString(File, "Clan_30", OrgInfo[ id ][ orgClan30 ]);
- INI_Close(File);
- }
- stock ImeIgraca( id ) {
- new ime[ MAX_PLAYER_NAME ];
- GetPlayerName( id, ime, sizeof ime);
- return ime;
- }
- stock GetPlayerIdFromName(playername[]) {
- for(new i = 0; i <= MAX_PLAYERS; i++) {
- if(IsPlayerConnected(i)) {
- new playername2[ MAX_PLAYER_NAME ];
- GetPlayerName(i, playername2, sizeof(playername2));
- if(strcmp(playername2, playername, true, strlen(playername)) ==0) {
- return i;
- }
- }
- }
- return INVALID_PLAYER_ID;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement