Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define FILTERSCRIPT
- #include <a_samp>
- #include <zcmd>
- #include <foreach>
- //#include <streamer>
- #include <sscanf2>
- #include <dini>
- enum dData //gangs savings player
- {
- Gangid,
- Gangrank,
- pGp,
- Gang1playercolor,
- Gang2playercolor,
- Gang3playercolor,
- Min,
- Hour,
- Sec
- }
- new PlayerInfo[MAX_PLAYERS][dData];
- #define PlayerFile "playergang/%s.ini"
- enum gData //gangspoints
- {
- Ganggp
- }
- new GangInfo[MAX_PLAYERS][gData];
- #define GangsFile "Gangsgp.ini"
- enum gwData //gang weapons
- {
- Gang1weap1,
- Gang1weap2,
- Gang1weap3,
- Gang1weap4,
- Gang1weap5,
- Gang1weap6,
- Gang1color,
- Gang2weap1,
- Gang2weap2,
- Gang2weap3,
- Gang2weap4,
- Gang2weap5,
- Gang2weap6,
- Gang2color,
- Gang3weap1,
- Gang3weap2,
- Gang3weap3,
- Gang3weap4,
- Gang3weap5,
- Gang3weap6,
- Gang3color
- }
- new GangInfoweaps[MAX_PLAYERS][gwData];
- #define GangsFileweap "Gangsweaps.ini"
- new countweaps[MAX_PLAYERS] = 0;
- //define settings
- #define MAX_GANGS 3
- #define N 69//gang members online
- new gangRankTargetID;// setrank
- //colors
- #define COLOR_RED 0xFF0000FF
- #define yellow "{ffff00}"
- #define cyan "{00ff00}"
- #define pink "{ffffff}"
- #define orange "{ff0000}"
- #define blue "{0000ff}"
- #define red "{ff0000}"
- #define white "{ffffff}"
- #define grey "{AFAFAF}"
- //dialogs
- #define DIALOG_gstats 19
- #define DIALOG_GRANK 20
- #define DIALOG_GANGWEAPS 21
- #define DIALOG_GANGCOLOR 22
- //gangzone
- new Zone1;
- new capture1 = 1;
- new capture1start = 0;
- new Zone2;
- new capture2 = 2;
- new capture2start = 0;
- new Zone3;
- new capture3 = 3;
- new capture3start = 0;
- public OnFilterScriptInit()
- {
- new file2[256], id, file3[256];
- format(file2,sizeof(file2),GangsFile);
- format(file3,sizeof(file3),GangsFileweap);
- GangInfo[id][Ganggp] = dini_Int(file2, "Ganggp");
- //GANGS CAPTURE PICKUP
- CreatePickup(1314 , 1, 1493.9996, 751.0131, 29.6638, -1);//GANG1
- CreatePickup(1314 , 1, 1089.1531, 1073.2957, 11.3150, -1);//GANG2
- CreatePickup(1314 , 1, 983.0714, 1733.2091, 9.3417, -1);//GANG3
- //GANGS CAPTURE ZONES
- Zone1 = GangZoneCreate(1310.488, 645.488, 1560.399, 823.4191);//zone GANG 1
- Zone2 = GangZoneCreate(923.9085, 951.0652, 1181.628, 1198.621);//zone GANG 2
- Zone3 = GangZoneCreate(857.5261, 1616.373, 994.1957, 1863.929);//zone GANG 3
- GangInfoweaps[id][Gang1color] = dini_Int(file3, "Gang1color");
- GangInfoweaps[id][Gang2color] = dini_Int(file3, "Gang2color");
- GangInfoweaps[id][Gang3color] = dini_Int(file3, "Gang3color");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- new file[256], name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- format(file,sizeof(file),PlayerFile,name);
- if(!dini_Exists(file) )
- {
- dini_Create(file);
- dini_Set(file,"Name",name);
- dini_IntSet(file,"Gangid",0);
- PlayerInfo[playerid][Gangid] = 0;
- PlayerInfo[playerid][Gangrank] = 0;
- PlayerInfo[playerid][pGp] = 0;
- PlayerInfo[playerid][Gang1playercolor] =0;
- PlayerInfo[playerid][Gang2playercolor] =0;
- PlayerInfo[playerid][Gang3playercolor] =0;
- PlayerInfo[playerid][Min] = 0;
- PlayerInfo[playerid][Hour] = 0;
- PlayerInfo[playerid][Sec] = 0;
- }
- else
- {
- PlayerInfo[playerid][Gangid] = dini_Int(file,"Gangid");
- PlayerInfo[playerid][Gangrank] = dini_Int(file,"Gangrank");
- PlayerInfo[playerid][pGp] = dini_Int(file,"Player gangpoints");
- PlayerInfo[playerid][Min] = dini_Int(file, "Min");
- PlayerInfo[playerid][Hour] = dini_Int(file, "Hour");
- PlayerInfo[playerid][Sec] = dini_Int(file, "Sec");
- new file2[256];
- format(file2,sizeof(file2),GangsFile);
- dini_IntSet(file2,"Ganggp",GangInfo[playerid][Ganggp]);
- GangInfo[playerid][Ganggp] = dini_Int(file2, "Ganggp");
- //gangs weapons
- new file3[256];
- format(file3,sizeof(file3),GangsFileweap);
- //gang1
- GangInfoweaps[playerid][Gang1weap1] = dini_Int(file3, "Gang1weap1");
- GangInfoweaps[playerid][Gang1weap2] = dini_Int(file3, "Gang1weap2");
- GangInfoweaps[playerid][Gang1weap3] = dini_Int(file3, "Gang1weap3");
- GangInfoweaps[playerid][Gang1weap4] = dini_Int(file3, "Gang1weap4");
- GangInfoweaps[playerid][Gang1weap5] = dini_Int(file3, "Gang1weap5");
- GangInfoweaps[playerid][Gang1weap6] = dini_Int(file3, "Gang1weap6");
- //GangInfoweaps[playerid][Gang1color] = dini_Int(file3, "Gang1color");
- PlayerInfo[playerid][Gang1playercolor] = dini_Int(file, "Gang1playercolor");
- //gang2
- GangInfoweaps[playerid][Gang2weap1] = dini_Int(file3, "Gang2weap1");
- GangInfoweaps[playerid][Gang2weap2] = dini_Int(file3, "Gang2weap2");
- GangInfoweaps[playerid][Gang2weap3] = dini_Int(file3, "Gang2weap3");
- GangInfoweaps[playerid][Gang2weap4] = dini_Int(file3, "Gang2weap4");
- GangInfoweaps[playerid][Gang2weap5] = dini_Int(file3, "Gang2weap5");
- GangInfoweaps[playerid][Gang2weap6] = dini_Int(file3, "Gang2weap6");
- //GangInfoweaps[playerid][Gang2color] = dini_Int(file3, "Gang2color");
- PlayerInfo[playerid][Gang2playercolor] = dini_Int(file, "Gang2playercolor");
- //gang3
- GangInfoweaps[playerid][Gang3weap1] = dini_Int(file3, "Gang3weap1");
- GangInfoweaps[playerid][Gang3weap2] = dini_Int(file3, "Gang3weap2");
- GangInfoweaps[playerid][Gang3weap3] = dini_Int(file3, "Gang3weap3");
- GangInfoweaps[playerid][Gang3weap4] = dini_Int(file3, "Gang3weap4");
- GangInfoweaps[playerid][Gang3weap5] = dini_Int(file3, "Gang3weap5");
- GangInfoweaps[playerid][Gang3weap6] = dini_Int(file3, "Gang3weap6");
- //GangInfoweaps[playerid][Gang3color] = dini_Int(file3, "Gang3color");
- PlayerInfo[playerid][Gang3playercolor] = dini_Int(file, "Gang3playercolor");
- if(PlayerInfo[playerid][Gangid] >=1) SetTimerEx("TimeOnServer", 1000, 1, "i", playerid);
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new file[256], name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- format(file,sizeof(file),PlayerFile,name);
- if(dini_Exists(file) )
- {
- dini_IntSet(file,"Gangid",PlayerInfo[playerid][Gangid]);
- dini_IntSet(file,"Gangrank",PlayerInfo[playerid][Gangrank]);
- dini_IntSet(file,"Player gangpoints",PlayerInfo[playerid][pGp]);
- dini_IntSet(file,"Min",PlayerInfo[playerid][Min]);
- dini_IntSet(file,"Hour",PlayerInfo[playerid][Hour]);
- dini_IntSet(file,"Sec",PlayerInfo[playerid][Sec]);
- }
- //gangs points
- new file2[256];
- format(file2,sizeof(file2),GangsFile);
- dini_IntSet(file2,"Ganggp",GangInfo[playerid][Ganggp]);
- return 1;
- }
- CMD:setgangweapons(playerid,params[])
- {
- if(PlayerInfo[playerid][Gangid] == 0) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You must be in a gang and have at least Owner rank in gang for use this command.");
- if(PlayerInfo[playerid][Gangrank] <= 4) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You need at least Owner rank in gang for change this gang settings.");
- if(countweaps[playerid] == 6)
- {
- countweaps[playerid] =0;
- }
- ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
- return 1;
- }
- CMD:setgangid(playerid,params[])
- {
- new id, level;
- if(!IsPlayerAdmin(playerid) ) return SendClientMessage(playerid,COLOR_RED,"ERROR:You are not an admin!");
- if(sscanf(params,"ud",id,level) ) return SendClientMessage(playerid,COLOR_RED,"USUAGE: /setgangid [id][gangid]");
- if(level > MAX_GANGS) return SendClientMessage(playerid,COLOR_RED,"ERROR:Invalid Level");
- if(!IsPlayerConnected(id) ) return SendClientMessage(playerid,COLOR_RED,"ERROR:Player is not connected");
- else
- {
- PlayerInfo[id][Gangid] = level;
- SpawnPlayer(id);
- }
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- new file[256], name[MAX_PLAYER_NAME], file3[256];
- GetPlayerName(playerid,name,sizeof(name));
- format(file,sizeof(file),PlayerFile,name);
- format(file3,sizeof(file3),GangsFileweap);
- if(PlayerInfo[playerid][Gangid] == 0)
- {
- SetPlayerPos(playerid,1509.4786,-1707.0342,14.0469); // ls
- }
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- SetPlayerColor(playerid, dini_Int(file, "Gang1playercolor"));
- SetPlayerPos(playerid, 1489.5876, 691.9392, 11.9275);
- GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang1weap1], 9999);
- GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang1weap2], 9999);
- GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang1weap3], 9999);
- GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang1weap4], 9999);
- GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang1weap5], 9999);
- GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang1weap6], 9999);
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- SetPlayerColor(playerid, dini_Int(file, "Gang2playercolor"));
- SetPlayerPos(playerid, 1046.1687, 1014.2678, 11.7839);
- GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang2weap1], 9999);
- GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang2weap2], 9999);
- GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang2weap3], 9999);
- GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang2weap4], 9999);
- GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang2weap5], 9999);
- GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang2weap6], 9999);
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- SetPlayerColor(playerid, dini_Int(file, "Gang3playercolor"));
- SetPlayerPos(playerid, 938.0714, 1733.2091, 9.3417);
- GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang3weap1], 9999);
- GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang3weap2], 9999);
- GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang3weap3], 9999);
- GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang3weap4], 9999);
- GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang3weap5], 9999);
- GivePlayerWeapon(playerid, GangInfoweaps[playerid][Gang3weap6], 9999);
- }
- //GANGZONES //Gang1color
- //if(capture1 == 1) GangZoneShowForAll(Zone1,0xFF000096);
- if(capture1 == 1) GangZoneShowForAll(Zone1,dini_Int(file3, "Gang1color"));
- if(capture1 == 2) GangZoneShowForAll(Zone1,dini_Int(file3, "Gang2color"));
- if(capture1 == 3) GangZoneShowForAll(Zone1,dini_Int(file3, "Gang3color"));
- //if(capture1 == 2) GangZoneShowForAll(Zone1,0xFFFFFF96);
- //if(capture1 == 3) GangZoneShowForAll(Zone1,0xFFFF009A);
- //
- if(capture2 == 1) GangZoneShowForAll(Zone2,dini_Int(file3, "Gang1color"));
- if(capture2 == 2) GangZoneShowForAll(Zone2,dini_Int(file3, "Gang2color"));
- if(capture2 == 3) GangZoneShowForAll(Zone2,dini_Int(file3, "Gang3color"));
- //if(capture2 == 1) GangZoneShowForAll(Zone2,0xFF000096);//0xFF000096 ROSSO
- //if(capture2 == 2) GangZoneShowForAll(Zone2,0xFFFFFF96);//0xFFFFFF96 BIANCO
- //if(capture2 == 3) GangZoneShowForAll(Zone2,0xFFFF009A);//0xFFFF009A GIALLO
- //
- if(capture3 == 1) GangZoneShowForAll(Zone3,dini_Int(file3, "Gang1color"));
- if(capture3 == 2) GangZoneShowForAll(Zone3,dini_Int(file3, "Gang2color"));
- if(capture3 == 3) GangZoneShowForAll(Zone3,dini_Int(file3, "Gang3color"));
- //if(capture3 == 1) GangZoneShowForAll(Zone3,0xFF000096);
- //if(capture3 == 2) GangZoneShowForAll(Zone3,0xFFFFFF96);
- //if(capture3 == 3) GangZoneShowForAll(Zone3,0xFFFF009A);
- return 1;
- }
- CMD:capture(playerid, params[])
- {
- ///////////////////////////////capture 1
- if(PlayerInfo[playerid][Gangid] == 0) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You must be in a gang for use this command.");
- new file3[256];
- format(file3,sizeof(file3),GangsFileweap);
- if (IsPlayerInRangeOfPoint(playerid, 3.0, 1493.9996, 751.0131, 29.6638))
- {
- if(capture1start >= 1) return SendClientMessage(playerid, -1,"You can't capture this territory because someone already started a /capture!");
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- if(capture1 == 1) return SendClientMessage(playerid, -1,"Your gang already own this territory!");
- if(PlayerInfo[playerid][Gangid] == 1 && capture2start == 1) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
- if(PlayerInfo[playerid][Gangid] == 1 && capture3start == 1) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
- SetTimerEx("EndAntiSpawnKill", 15000, false, "i", playerid);
- GangZoneFlashForAll(Zone1,dini_Int(file3, "Gang1color"));
- capture1start = 1;
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- if(capture1 == 2) return SendClientMessage(playerid, -1,"Your gang already own this territory!");
- if(PlayerInfo[playerid][Gangid] == 2 && capture2start == 2) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
- if(PlayerInfo[playerid][Gangid] == 2 && capture3start == 2) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
- SetTimerEx("EndAntiSpawnKill", 15000, false, "i", playerid);
- GangZoneFlashForAll(Zone1,dini_Int(file3, "Gang2color"));
- capture1start = 2;
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- if(capture1 == 3) return SendClientMessage(playerid, -1,"Your gang already own this territory!");
- if(PlayerInfo[playerid][Gangid] == 3 && capture2start == 3) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
- if(PlayerInfo[playerid][Gangid] == 3 && capture3start == 3) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
- SetTimerEx("EndAntiSpawnKill", 15000, false, "i", playerid);
- GangZoneFlashForAll(Zone1,dini_Int(file3, "Gang3color"));
- capture1start = 3;
- }
- }
- ///////////////////////////////capture 2
- if (IsPlayerInRangeOfPoint(playerid, 3.0, 1089.1531, 1073.2957, 11.3150))
- {
- if(capture2start >= 1) return SendClientMessage(playerid, -1,"You can't capture this territory because someone already started a /capture!");
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- if(capture2 == 1) return SendClientMessage(playerid, -1,"Your gang already own this territory!");
- if(PlayerInfo[playerid][Gangid] == 1 && capture1start == 1) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
- if(PlayerInfo[playerid][Gangid] == 1 && capture3start == 1) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
- SetTimerEx("EndAntiSpawnKill", 15000, false, "i", playerid);
- GangZoneFlashForAll(Zone2,dini_Int(file3, "Gang1color"));
- capture2start = 1;
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- if(capture2 == 2) return SendClientMessage(playerid, -1,"Your gang already own this territory!");
- if(PlayerInfo[playerid][Gangid] == 2 && capture1start == 2) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
- if(PlayerInfo[playerid][Gangid] == 2 && capture3start == 2) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
- SetTimerEx("EndAntiSpawnKill", 15000, false, "i", playerid);
- GangZoneFlashForAll(Zone2,dini_Int(file3, "Gang2color"));
- capture2start = 2;
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- if(capture2 == 3) return SendClientMessage(playerid, -1,"Your gang already own this territory!");
- if(PlayerInfo[playerid][Gangid] == 3 && capture1start == 3) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
- if(PlayerInfo[playerid][Gangid] == 3 && capture3start == 3) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
- SetTimerEx("EndAntiSpawnKill", 15000, false, "i", playerid);
- GangZoneFlashForAll(Zone2,dini_Int(file3, "Gang3color"));
- capture2start = 3;
- }
- }
- //////////////////////capture 3
- if (IsPlayerInRangeOfPoint(playerid, 3.0, 983.0714, 1733.2091, 9.3417))
- {
- if(capture3start >= 1) return SendClientMessage(playerid, -1,"You can't capture this territory because someone already started a /capture!");
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- if(capture3 == 1) return SendClientMessage(playerid, -1,"Your gang already own this territory!");
- if(PlayerInfo[playerid][Gangid] == 1 && capture1start == 1) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
- if(PlayerInfo[playerid][Gangid] == 1 && capture2start == 1) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
- SetTimerEx("EndAntiSpawnKill", 15000, false, "i", playerid);
- GangZoneFlashForAll(Zone3,dini_Int(file3, "Gang1color"));
- capture3start = 1;
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- if(capture3 == 2) return SendClientMessage(playerid, -1,"Your gang already own this territory!");
- if(PlayerInfo[playerid][Gangid] == 2 && capture1start == 2) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
- if(PlayerInfo[playerid][Gangid] == 2 && capture2start == 2) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
- SetTimerEx("EndAntiSpawnKill", 15000, false, "i", playerid);
- GangZoneFlashForAll(Zone3,dini_Int(file3, "Gang2color"));
- capture3start = 2;
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- if(capture3 == 3) return SendClientMessage(playerid, -1,"Your gang already own this territory!");
- if(PlayerInfo[playerid][Gangid] == 3 && capture1start == 3) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
- if(PlayerInfo[playerid][Gangid] == 3 && capture2start == 3) return SendClientMessage(playerid, -1,"You can't capture this territory because your gang already started a /capture on another territory!");
- SetTimerEx("EndAntiSpawnKill", 15000, false, "i", playerid);
- GangZoneFlashForAll(Zone3,dini_Int(file3, "Gang3color"));
- capture3start = 3;
- }
- }
- return 1;
- }
- forward EndAntiSpawnKill(playerid);
- public EndAntiSpawnKill(playerid)
- { ///////////////////////////////capture 1
- new file3[256];
- format(file3,sizeof(file3),GangsFileweap);
- if (IsPlayerInRangeOfPoint(playerid, 5.0, 1493.9996, 751.0131, 29.6638))
- {
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- GangZoneStopFlashForAll(Zone1);
- GangZoneShowForAll(Zone1,dini_Int(file3, "Gang1color"));
- capture1 = 1;
- capture1start =0;
- PlayerInfo[playerid][pGp] += 3;
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- GangZoneStopFlashForAll(Zone1);
- GangZoneShowForAll(Zone1,dini_Int(file3, "Gang2color"));
- capture1 = 2;
- capture1start =0;
- PlayerInfo[playerid][pGp] += 3;
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- GangZoneStopFlashForAll(Zone1);
- GangZoneShowForAll(Zone1,dini_Int(file3, "Gang3color"));
- capture1 = 3;
- capture1start =0;
- PlayerInfo[playerid][pGp] += 3;
- }
- }
- else
- if(capture1start >= 1)
- {
- if(!IsPlayerInRangeOfPoint(playerid, 5.0, 1493.9996, 751.0131, 29.6638))
- {
- SendClientMessage(playerid, -1,"You need to stay max 5metres from the capture checkpoint.!");
- GangZoneStopFlashForAll(Zone1);
- if(capture1start == 1 && capture1 == 1) return capture1 = 1;
- if(capture1start == 1 && capture1 == 2) return capture1 = 2;
- if(capture1start == 1 && capture1 == 3) return capture1 = 3;
- if(capture1start == 2 && capture1 == 1) return capture1 = 1;
- if(capture1start == 2 && capture1 == 2) return capture1 = 2;
- if(capture1start == 2 && capture1 == 3) return capture1 = 3;
- if(capture1start == 3 && capture1 == 1) return capture1 = 1;
- if(capture1start == 3 && capture1 == 2) return capture1 = 2;
- if(capture1start == 3 && capture1 == 3) return capture1 = 3;
- }
- }
- ///////////////////////////////capture 2
- if (IsPlayerInRangeOfPoint(playerid, 5.0, 1089.1531, 1073.2957, 11.3150))
- {
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- GangZoneStopFlashForAll(Zone2);
- GangZoneShowForAll(Zone2,dini_Int(file3, "Gang1color"));
- capture2 = 1;
- capture2start =0;
- PlayerInfo[playerid][pGp] += 3;
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- GangZoneStopFlashForAll(Zone2);
- GangZoneShowForAll(Zone2,dini_Int(file3, "Gang2color"));
- capture2 = 2;
- capture2start =0;
- PlayerInfo[playerid][pGp] += 3;
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- GangZoneStopFlashForAll(Zone2);
- GangZoneShowForAll(Zone2,dini_Int(file3, "Gang3color"));
- capture2 = 3;
- capture2start =0;
- PlayerInfo[playerid][pGp] += 3;
- }
- }
- else
- if(capture2start >= 1)
- {
- if(!IsPlayerInRangeOfPoint(playerid, 5.0, 1089.1531, 1073.2957, 11.3150))
- {
- SendClientMessage(playerid, -1,"You need to stay max 5metres from the capture checkpoint.!");
- GangZoneStopFlashForAll(Zone2);
- capture2start = 0;
- if(capture2start == 1 && capture2 == 1) return capture2 = 1;
- if(capture2start == 1 && capture2 == 2) return capture2 = 2;
- if(capture2start == 1 && capture2 == 3) return capture2 = 3;
- if(capture2start == 2 && capture2 == 1) return capture2 = 1;
- if(capture2start == 2 && capture2 == 2) return capture2 = 2;
- if(capture2start == 2 && capture2 == 3) return capture2 = 3;
- if(capture2start == 3 && capture2 == 1) return capture2 = 1;
- if(capture2start == 3 && capture2 == 2) return capture2 = 2;
- if(capture2start == 3 && capture2 == 3) return capture2 = 3;
- }
- }
- ///////////////////////////////////capture 3
- if (IsPlayerInRangeOfPoint(playerid, 5.0, 983.0714, 1733.2091, 9.3417))
- {
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- GangZoneStopFlashForAll(Zone3);
- GangZoneShowForAll(Zone3,dini_Int(file3, "Gang1color"));
- capture3 = 1;
- capture3start =0;
- PlayerInfo[playerid][pGp] += 3;
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- GangZoneStopFlashForAll(Zone3);
- GangZoneShowForAll(Zone3,dini_Int(file3, "Gang2color"));
- capture3 = 2;
- capture3start =0;
- PlayerInfo[playerid][pGp] += 3;
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- GangZoneStopFlashForAll(Zone3);
- GangZoneShowForAll(Zone3,dini_Int(file3, "Gang3color"));
- capture3 = 3;
- capture3start =0;
- PlayerInfo[playerid][pGp] += 3;
- }
- }
- else
- {
- if(capture3start >= 1)
- {
- if(!IsPlayerInRangeOfPoint(playerid, 5.0, 983.0714, 1733.2091, 9.3417))
- {
- SendClientMessage(playerid, -1,"You need to stay max 5metres from the capture checkpoint.!");
- GangZoneStopFlashForAll(Zone3);
- if(capture3start == 1 && capture3 == 1) return capture3 = 1;
- if(capture3start == 1 && capture3 == 2) return capture3 = 2;
- if(capture3start == 1 && capture3 == 3) return capture3 = 3;
- if(capture3start == 2 && capture3 == 1) return capture3 = 1;
- if(capture3start == 2 && capture3 == 2) return capture3 = 2;
- if(capture3start == 2 && capture3 == 3) return capture3 = 3;
- if(capture3start == 3 && capture3 == 1) return capture3 = 1;
- if(capture3start == 3 && capture3 == 2) return capture3 = 2;
- if(capture3start == 3 && capture3 == 3) return capture3 = 3;
- }
- }
- }
- return 1;
- }
- CMD:gstats(playerid,params[])
- {
- new string2[400];
- new ID;
- new pname[MAX_PLAYER_NAME];
- if(sscanf(params, "u", ID)) return SendClientMessage(playerid, -1, "{FF0000}USAGE: {FFFFFF}/Gstats [playerid]");
- if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}That player isn't connected.");
- if(PlayerInfo[playerid][Gangid] == 0) return SendClientMessage(playerid, 0xff0000ff, "ERROR: That player doesn't have a gang.");
- GetPlayerName(ID, pname, sizeof(pname));
- new stringa[30];
- if(PlayerInfo[ID][Gangid] == 1) format(stringa, sizeof(stringa),"{15FF00}Thug 4 Life", ID);
- if(PlayerInfo[ID][Gangid] == 2) format(stringa, sizeof(stringa),"{15FF00}United Pirates Castle", ID);
- if(PlayerInfo[ID][Gangid] == 3) format(stringa, sizeof(stringa),"{15FF00}Free gang slot", ID);
- new stringas[30];
- if(PlayerInfo[ID][Gangrank] == 1) format(stringas, sizeof(stringas),"Member", ID);
- if(PlayerInfo[ID][Gangrank] == 2) format(stringas, sizeof(stringas),"Co-leader", ID);
- if(PlayerInfo[ID][Gangrank] == 3) format(stringas, sizeof(stringas),"Leader", ID);
- if(PlayerInfo[ID][Gangrank] == 4) format(stringas, sizeof(stringas),"Co-Owner", ID);
- if(PlayerInfo[ID][Gangrank] == 5) format(stringas, sizeof(stringas),"Owner", ID);
- if(PlayerInfo[ID][Gangrank] == 6) format(stringas, sizeof(stringas),"Founder", ID);
- format(string2,sizeof(string2),"{15FF00}%s {FF0000}Gang stats \n{FF0000}Gang: {15FF00}%s\n{FF0000}Gang rank: {15FF00}%s\n{FF0000}Gang points: {15FF00}%d\n{ff0000}Gang time: {15FF00}%d:%d:%d\n",pname,stringa,stringas,PlayerInfo[ID][pGp],PlayerInfo[ID][Hour],PlayerInfo[ID][Min],PlayerInfo[ID][Sec]);
- ShowPlayerDialog(playerid,DIALOG_gstats,DIALOG_STYLE_MSGBOX,"{15FF00}Gang Stats",string2,"Close","");
- return 1;
- }
- CMD:gm(playerid, params[])
- {
- if(PlayerInfo[playerid][Gangid] == 0) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You must be in a gang to use this command.");
- new count1 = 0;
- new count2 = 0;
- new count3 = 0;
- new string[256], string2[3000];
- strcat(string2, ""yellow"");
- strcat(string2, ".:: MEMBERS ONLINE ::.\n");
- foreach(Player,x)
- {
- new ranks[90];
- switch(PlayerInfo[playerid][Gangrank])
- {
- case 1: ranks = ""red"(Member)";
- case 2: ranks = ""red"(Co-leader)";
- case 3: ranks = ""red"(Leader)";
- case 4: ranks = ""red"(Co-Owner)";
- case 5: ranks = ""red"(Owner)";
- case 6: ranks = ""red"(Founder)";
- }
- if(PlayerInfo[x][Gangid] == 1)
- {
- count1++;
- format(string, sizeof(string),"ยป %s[%d] "yellow"Rank: %s\n", GetName(x), x, ranks);
- strcat(string2, string);
- if(PlayerInfo[playerid][Gangid] == 1) ShowPlayerDialog(playerid, N, DIALOG_STYLE_LIST, ""red"Gangs members online now", string2, "Close", "");
- }
- if(PlayerInfo[x][Gangid] == 2)
- {
- count2++;
- format(string, sizeof(string),"ยป %s[%d] "yellow"Rank: %s\n", GetName(x), x, ranks);
- strcat(string2, string);
- if(PlayerInfo[playerid][Gangid] == 2) ShowPlayerDialog(playerid, N, DIALOG_STYLE_LIST, ""red"Gangs members online now", string2, "Close", "");
- }
- if(PlayerInfo[x][Gangid] == 3)
- {
- count3++;
- format(string, sizeof(string),"ยป %s[%d] "yellow"Rank: %s\n", GetName(x), x, ranks);
- strcat(string2, string);
- if(PlayerInfo[playerid][Gangid] == 3) ShowPlayerDialog(playerid, N, DIALOG_STYLE_LIST, ""red"Gangs members online now", string2, "Close", "");
- }
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_GANGWEAPS)
- {
- if(response)
- {
- new file3[256];
- if(listitem == 0)
- {
- if(countweaps[playerid] <= 6)
- {
- format(file3,sizeof(file3),GangsFileweap);
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- GangInfoweaps[playerid][Gang1weap1] = 4;
- dini_IntSet(file3,"Gang1weap1",GangInfoweaps[playerid][Gang1weap1]);
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- GangInfoweaps[playerid][Gang2weap1] = 4;
- dini_IntSet(file3,"Gang2weap1",GangInfoweaps[playerid][Gang2weap1]);
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- GangInfoweaps[playerid][Gang3weap1] = 4;
- dini_IntSet(file3,"Gang3weap1",GangInfoweaps[playerid][Gang3weap1]);
- }
- GivePlayerWeapon(playerid, 4, 9999);
- countweaps[playerid] = 1;
- if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
- ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
- }
- }
- if(listitem == 1)
- {
- if(countweaps[playerid] <= 6)
- {
- format(file3,sizeof(file3),GangsFileweap);
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- GangInfoweaps[playerid][Gang1weap1] = 4;
- dini_IntSet(file3,"Gang1weap1",GangInfoweaps[playerid][Gang1weap1]);
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- GangInfoweaps[playerid][Gang2weap1] = 4;
- dini_IntSet(file3,"Gang2weap1",GangInfoweaps[playerid][Gang2weap1]);
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- GangInfoweaps[playerid][Gang3weap1] = 4;
- dini_IntSet(file3,"Gang3weap1",GangInfoweaps[playerid][Gang3weap1]);
- }
- GivePlayerWeapon(playerid, 9, 9999);
- countweaps[playerid] +=1;
- if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
- ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
- }
- }
- if(listitem == 2)
- {
- if(countweaps[playerid] <= 6)
- {
- format(file3,sizeof(file3),GangsFileweap);
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- GangInfoweaps[playerid][Gang1weap2] = 22;
- dini_IntSet(file3,"Gang1weap2",GangInfoweaps[playerid][Gang1weap2]);
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- GangInfoweaps[playerid][Gang2weap2] = 22;
- dini_IntSet(file3,"Gang2weap2",GangInfoweaps[playerid][Gang2weap2]);
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- GangInfoweaps[playerid][Gang2weap2] = 22;
- dini_IntSet(file3,"Gang3weap2",GangInfoweaps[playerid][Gang3weap2]);
- }
- GivePlayerWeapon(playerid, 22, 9999);
- countweaps[playerid] +=1;
- if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
- ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
- }
- }
- if(listitem == 3)
- {
- if(countweaps[playerid] <= 6)
- {
- format(file3,sizeof(file3),GangsFileweap);
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- GangInfoweaps[playerid][Gang1weap2] = 23;
- dini_IntSet(file3,"Gang1weap2",GangInfoweaps[playerid][Gang1weap2]);
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- GangInfoweaps[playerid][Gang2weap2] = 23;
- dini_IntSet(file3,"Gang2weap2",GangInfoweaps[playerid][Gang2weap2]);
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- GangInfoweaps[playerid][Gang3weap2] = 23;
- dini_IntSet(file3,"Gang3weap2",GangInfoweaps[playerid][Gang3weap2]);
- }
- GivePlayerWeapon(playerid, 23, 9999);
- countweaps[playerid] +=1;
- if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
- ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
- }
- }
- if(listitem == 4)
- {
- if(countweaps[playerid] <= 6)
- {
- format(file3,sizeof(file3),GangsFileweap);
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- GangInfoweaps[playerid][Gang1weap2] = 24;
- dini_IntSet(file3,"Gang1weap2",GangInfoweaps[playerid][Gang1weap2]);
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- GangInfoweaps[playerid][Gang2weap2] = 24;
- dini_IntSet(file3,"Gang2weap2",GangInfoweaps[playerid][Gang2weap2]);
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- GangInfoweaps[playerid][Gang3weap2] = 24;
- dini_IntSet(file3,"Gang3weap2",GangInfoweaps[playerid][Gang3weap2]);
- }
- GivePlayerWeapon(playerid, 24, 9999);
- countweaps[playerid] +=1;
- if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
- ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
- }
- }
- if(listitem == 5)
- {
- if(countweaps[playerid] <= 6)
- {
- format(file3,sizeof(file3),GangsFileweap);
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- GangInfoweaps[playerid][Gang1weap3] = 25;
- dini_IntSet(file3,"Gang1weap3",GangInfoweaps[playerid][Gang1weap3]);
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- GangInfoweaps[playerid][Gang2weap3] = 25;
- dini_IntSet(file3,"Gang2weap3",GangInfoweaps[playerid][Gang2weap3]);
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- GangInfoweaps[playerid][Gang3weap3] = 25;
- dini_IntSet(file3,"Gang3weap3",GangInfoweaps[playerid][Gang3weap3]);
- }
- GivePlayerWeapon(playerid, 25, 9999);
- countweaps[playerid] +=1;
- if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
- ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
- }
- }
- if(listitem == 6)
- {
- if(countweaps[playerid] <= 6)
- {
- format(file3,sizeof(file3),GangsFileweap);
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- GangInfoweaps[playerid][Gang1weap3] = 26;
- dini_IntSet(file3,"Gang1weap3",GangInfoweaps[playerid][Gang1weap3]);
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- GangInfoweaps[playerid][Gang2weap3] = 26;
- dini_IntSet(file3,"Gang2weap3",GangInfoweaps[playerid][Gang2weap3]);
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- GangInfoweaps[playerid][Gang3weap3] = 26;
- dini_IntSet(file3,"Gang3weap3",GangInfoweaps[playerid][Gang3weap3]);
- }
- GivePlayerWeapon(playerid, 26, 9999);
- countweaps[playerid] +=1;
- if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
- ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
- }
- }
- if(listitem == 7)
- {
- if(countweaps[playerid] <= 6)
- {
- format(file3,sizeof(file3),GangsFileweap);
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- GangInfoweaps[playerid][Gang1weap3] = 27;
- dini_IntSet(file3,"Gang1weap3",GangInfoweaps[playerid][Gang1weap3]);
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- GangInfoweaps[playerid][Gang2weap3] = 27;
- dini_IntSet(file3,"Gang2weap3",GangInfoweaps[playerid][Gang2weap3]);
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- GangInfoweaps[playerid][Gang3weap3] = 27;
- dini_IntSet(file3,"Gang3weap3",GangInfoweaps[playerid][Gang3weap3]);
- }
- GivePlayerWeapon(playerid, 27, 9999);
- countweaps[playerid] +=1;
- if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
- ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
- }
- }
- if(listitem == 8)
- {
- if(countweaps[playerid] <= 6)
- {
- format(file3,sizeof(file3),GangsFileweap);
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- GangInfoweaps[playerid][Gang1weap4] = 28;
- dini_IntSet(file3,"Gang1weap4",GangInfoweaps[playerid][Gang1weap4]);
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- GangInfoweaps[playerid][Gang2weap4] = 28;
- dini_IntSet(file3,"Gang2weap4",GangInfoweaps[playerid][Gang2weap4]);
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- GangInfoweaps[playerid][Gang3weap4] = 28;
- dini_IntSet(file3,"Gang3weap4",GangInfoweaps[playerid][Gang3weap4]);
- }
- GivePlayerWeapon(playerid, 28, 9999);
- countweaps[playerid] +=1;
- if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
- ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
- }
- }
- if(listitem == 9)
- {
- if(countweaps[playerid] <= 6)
- {
- format(file3,sizeof(file3),GangsFileweap);
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- GangInfoweaps[playerid][Gang1weap4] = 29;
- dini_IntSet(file3,"Gang1weap4",GangInfoweaps[playerid][Gang1weap4]);
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- GangInfoweaps[playerid][Gang2weap4] = 29;
- dini_IntSet(file3,"Gang2weap4",GangInfoweaps[playerid][Gang2weap4]);
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- GangInfoweaps[playerid][Gang3weap4] = 29;
- dini_IntSet(file3,"Gang3weap4",GangInfoweaps[playerid][Gang3weap4]);
- }
- GivePlayerWeapon(playerid, 29, 9999);
- countweaps[playerid] +=1;
- if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
- ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
- }
- }
- if(listitem == 10)
- {
- if(countweaps[playerid] <= 6)
- {
- format(file3,sizeof(file3),GangsFileweap);
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- GangInfoweaps[playerid][Gang1weap4] = 32;
- dini_IntSet(file3,"Gang1weap4",GangInfoweaps[playerid][Gang1weap4]);
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- GangInfoweaps[playerid][Gang2weap4] = 32;
- dini_IntSet(file3,"Gang2weap4",GangInfoweaps[playerid][Gang2weap4]);
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- GangInfoweaps[playerid][Gang3weap4] = 32;
- dini_IntSet(file3,"Gang3weap4",GangInfoweaps[playerid][Gang3weap4]);
- }
- GivePlayerWeapon(playerid, 32, 9999);
- countweaps[playerid] +=1;
- if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
- ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
- }
- }
- if(listitem == 11)
- {
- if(countweaps[playerid] <= 6)
- {
- format(file3,sizeof(file3),GangsFileweap);
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- GangInfoweaps[playerid][Gang1weap5] = 30;
- dini_IntSet(file3,"Gang1weap5",GangInfoweaps[playerid][Gang1weap5]);
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- GangInfoweaps[playerid][Gang2weap5] = 30;
- dini_IntSet(file3,"Gang2weap5",GangInfoweaps[playerid][Gang2weap5]);
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- GangInfoweaps[playerid][Gang3weap5] = 30;
- dini_IntSet(file3,"Gang3weap5",GangInfoweaps[playerid][Gang3weap5]);
- }
- GivePlayerWeapon(playerid, 30, 9999);
- countweaps[playerid] +=1;
- if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
- ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
- }
- }
- if(listitem == 12)
- {
- if(countweaps[playerid] <= 6)
- {
- format(file3,sizeof(file3),GangsFileweap);
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- GangInfoweaps[playerid][Gang1weap5] = 31;
- dini_IntSet(file3,"Gang1weap5",GangInfoweaps[playerid][Gang1weap5]);
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- GangInfoweaps[playerid][Gang2weap5] = 31;
- dini_IntSet(file3,"Gang2weap5",GangInfoweaps[playerid][Gang2weap5]);
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- GangInfoweaps[playerid][Gang3weap5] = 31;
- dini_IntSet(file3,"Gang3weap5",GangInfoweaps[playerid][Gang3weap5]);
- }
- GivePlayerWeapon(playerid, 31, 9999);
- countweaps[playerid] +=1;
- if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
- ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
- }
- }
- if(listitem == 13)
- {
- if(countweaps[playerid] <= 6)
- {
- format(file3,sizeof(file3),GangsFileweap);
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- GangInfoweaps[playerid][Gang1weap6] = 33;
- dini_IntSet(file3,"Gang1weap6",GangInfoweaps[playerid][Gang1weap6]);
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- GangInfoweaps[playerid][Gang2weap6] = 33;
- dini_IntSet(file3,"Gang2weap6",GangInfoweaps[playerid][Gang2weap6]);
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- GangInfoweaps[playerid][Gang3weap6] = 33;
- dini_IntSet(file3,"Gang3weap6",GangInfoweaps[playerid][Gang3weap6]);
- }
- GivePlayerWeapon(playerid, 33, 9999);
- countweaps[playerid] +=1;
- if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
- ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
- }
- }
- if(listitem == 14)
- {
- if(countweaps[playerid] <= 6)
- {
- format(file3,sizeof(file3),GangsFileweap);
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- GangInfoweaps[playerid][Gang1weap6] = 34;
- dini_IntSet(file3,"Gang1weap6",GangInfoweaps[playerid][Gang1weap6]);
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- GangInfoweaps[playerid][Gang2weap6] = 34;
- dini_IntSet(file3,"Gang2weap6",GangInfoweaps[playerid][Gang2weap6]);
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- GangInfoweaps[playerid][Gang3weap6] = 34;
- dini_IntSet(file3,"Gang3weap6",GangInfoweaps[playerid][Gang3weap6]);
- }
- GivePlayerWeapon(playerid, 34, 9999);
- countweaps[playerid] +=1;
- if(countweaps[playerid] == 6) return SendClientMessage(playerid, 0xff0000ff, "WEAPONS SETTINGS CHANGED: Use /REFRESHALL, for give new weapons to all yours gang members.");
- ShowPlayerDialog(playerid, DIALOG_GANGWEAPS, DIALOG_STYLE_LIST, "Weapons list", "Knife (weapon slot 1)\nChainsaw (weapon slot 1)\n9mm (weapon slot 2)\nSilenced 9mm (weapon slot 2)\nDesert Eagle (weapon slot 2)\nShotgun (weapon slot 3)\nSawnoff Shotgun (weapon slot 3)\nCombat Shotgun (weapon slot 3)\nMicro SMG/Uzi (weapon slot 4)\nMP5 (weapon slot 4)\nTec-9 (weapon slot 4)\nAK-47 (weapon slot 5)\nM4 (weapon slot 5)\nCountry Rifle (weapon slot 6)\nSniper Rifle (weapon slot 6)", "Select", "Close");
- }
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_GRANK)
- {
- if(response)
- {
- if(listitem == 0)
- {
- if(PlayerInfo[playerid][Gangrank] >= 1) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You need at least Leader rank in gang for set this rank.");
- PlayerInfo[gangRankTargetID][Gangrank] = 1;
- }
- if(listitem == 1)
- {
- if(PlayerInfo[playerid][Gangrank] <= 2) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You need at least Leader rank in gang for set this rank.");
- PlayerInfo[gangRankTargetID][Gangrank] = 2;
- }
- if(listitem == 2)
- {
- if(PlayerInfo[playerid][Gangrank] <= 3) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You need at least Co-Owner rank in gang for set this rank.");
- PlayerInfo[gangRankTargetID][Gangrank] = 3;
- }
- if(listitem == 3)
- {
- if(PlayerInfo[playerid][Gangrank] <= 4) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You need at least Owner rank in gang for set this rank.");
- PlayerInfo[gangRankTargetID][Gangrank] = 4;
- }
- if(listitem == 4)
- {
- if(PlayerInfo[playerid][Gangrank] <= 5) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You need at least Founder rank in gang for set this rank.");
- PlayerInfo[gangRankTargetID][Gangrank] = 5;
- }
- if(listitem == 5)
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You are not authorized to set this rank.");
- PlayerInfo[gangRankTargetID][Gangrank] = 6;
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_GANGCOLOR)
- {
- if(response)
- {
- new file[256], name[MAX_PLAYER_NAME], file3[256];
- GetPlayerName(playerid,name,sizeof(name));
- format(file,sizeof(file),PlayerFile,name);
- format(file3,sizeof(file3),GangsFileweap);
- if(listitem == 0)
- {
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- SetPlayerColor(playerid, 0xFF000085);
- GangZoneShowForAll(Zone1, 0xFF000085);//ROSSO
- dini_IntSet(file,"Gang1playercolor",GetPlayerColor(playerid));
- dini_IntSet(file3,"Gang1color",GetPlayerColor(playerid));
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- SetPlayerColor(playerid, 0xFF000085);
- GangZoneShowForAll(Zone2, 0xFF000085);//ROSSO
- dini_IntSet(file,"Gang2playercolor",GetPlayerColor(playerid));
- dini_IntSet(file3,"Gang2color",GetPlayerColor(playerid));
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- SetPlayerColor(playerid, 0xFF000085);
- GangZoneShowForAll(Zone3, 0xFF000085);//ROSSO
- dini_IntSet(file,"Gang3playercolor",GetPlayerColor(playerid));
- dini_IntSet(file3,"Gang3color",GetPlayerColor(playerid));
- }
- }
- if(listitem == 1)
- {
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- GangZoneShowForAll(Zone1, 0x0000CE96);//BLU
- SetPlayerColor(playerid, 0x0000CE96);
- dini_IntSet(file,"Gang1playercolor",GetPlayerColor(playerid));
- dini_IntSet(file3,"Gang1color",GetPlayerColor(playerid));
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- GangZoneShowForAll(Zone2, 0x0000CE96);//BLU
- SetPlayerColor(playerid, 0x0000CE96);
- dini_IntSet(file,"Gang2playercolor",GetPlayerColor(playerid));
- dini_IntSet(file3,"Gang2color",GetPlayerColor(playerid));
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- GangZoneShowForAll(Zone3, 0x0000CE96);//BLU
- SetPlayerColor(playerid, 0x0000CE96);
- dini_IntSet(file,"Gang3playercolor",GetPlayerColor(playerid));
- dini_IntSet(file3,"Gang3color",GetPlayerColor(playerid));
- }
- }
- if(listitem == 2)
- {
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- GangZoneShowForAll(Zone1, 0xFFFFFF96);//BIANco
- SetPlayerColor(playerid, 0xFFFFFF96);
- dini_IntSet(file,"Gang1playercolor",GetPlayerColor(playerid));
- dini_IntSet(file3,"Gang1color",GetPlayerColor(playerid));
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- GangZoneShowForAll(Zone2, 0xFFFFFF96);//BIANco
- SetPlayerColor(playerid, 0xFFFFFF96);
- dini_IntSet(file,"Gang2playercolor",GetPlayerColor(playerid));
- dini_IntSet(file3,"Gang2color",GetPlayerColor(playerid));
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- GangZoneShowForAll(Zone3, 0xFFFFFF96);//BIANco
- SetPlayerColor(playerid, 0xFFFFFF96);
- dini_IntSet(file,"Gang3playercolor",GetPlayerColor(playerid));
- dini_IntSet(file3,"Gang3color",GetPlayerColor(playerid));
- }
- }
- if(listitem == 3)
- {
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- GangZoneShowForAll(Zone1, 0xFFFF0096);//GIALLO
- SetPlayerColor(playerid, 0xFFFF0096);
- dini_IntSet(file,"Gang1playercolor",GetPlayerColor(playerid));
- dini_IntSet(file3,"Gang1color",GetPlayerColor(playerid));
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- GangZoneShowForAll(Zone2, 0xFFFF0096);//GIALLO
- SetPlayerColor(playerid, 0xFFFF0096);
- dini_IntSet(file,"Gang2playercolor",GetPlayerColor(playerid));
- dini_IntSet(file3,"Gang2color",GetPlayerColor(playerid));
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- GangZoneShowForAll(Zone3, 0xFFFF0096);//GIALLO
- SetPlayerColor(playerid, 0xFFFF0096);
- dini_IntSet(file,"Gang3playercolor",GetPlayerColor(playerid));
- dini_IntSet(file3,"Gang3color",GetPlayerColor(playerid));
- }
- }
- if(listitem == 4)
- {
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- GangZoneShowForAll(Zone1, 0xFF800096);//ARANCIONE
- SetPlayerColor(playerid, 0xFF800096);
- dini_IntSet(file,"Gang1playercolor",GetPlayerColor(playerid));
- dini_IntSet(file3,"Gang1color",GetPlayerColor(playerid));
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- GangZoneShowForAll(Zone2, 0xFF800096);//ARANCIONE
- SetPlayerColor(playerid, 0xFF800096);
- dini_IntSet(file,"Gang2playercolor",GetPlayerColor(playerid));
- dini_IntSet(file3,"Gang2color",GetPlayerColor(playerid));
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- GangZoneShowForAll(Zone3, 0xFF800096);//ARANCIONE
- SetPlayerColor(playerid, 0xFF800096);
- dini_IntSet(file,"Gang3playercolor",GetPlayerColor(playerid));
- dini_IntSet(file3,"Gang3color",GetPlayerColor(playerid));
- }
- }
- if(listitem == 5)
- {
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- GangZoneShowForAll(Zone1, 0xA4007796);//VIOLA
- SetPlayerColor(playerid, 0xA4007796);
- dini_IntSet(file,"Gang1playercolor",GetPlayerColor(playerid));
- dini_IntSet(file3,"Gang1color",GetPlayerColor(playerid));
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- GangZoneShowForAll(Zone2, 0xA4007796);//VIOLA
- SetPlayerColor(playerid, 0xA4007796);
- dini_IntSet(file,"Gang2playercolor",GetPlayerColor(playerid));
- dini_IntSet(file3,"Gang2color",GetPlayerColor(playerid));
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- GangZoneShowForAll(Zone3, 0xA4007796);//VIOLA
- SetPlayerColor(playerid, 0xA4007796);
- dini_IntSet(file,"Gang3playercolor",GetPlayerColor(playerid));
- dini_IntSet(file3,"Gang3color",GetPlayerColor(playerid));
- }
- }
- if(listitem == 6)
- {
- if(PlayerInfo[playerid][Gangid] == 1)
- {
- GangZoneShowForAll(Zone1, 0x00FF0096);//VERDE
- SetPlayerColor(playerid, 0x00FF0096);
- dini_IntSet(file,"Gang1playercolor",GetPlayerColor(playerid));
- dini_IntSet(file3,"Gang1color",GetPlayerColor(playerid));
- }
- if(PlayerInfo[playerid][Gangid] == 2)
- {
- GangZoneShowForAll(Zone2, 0x00FF0096);//VERDE
- SetPlayerColor(playerid, 0x00FF0096);
- dini_IntSet(file,"Gang2playercolor",GetPlayerColor(playerid));
- dini_IntSet(file3,"Gang2color",GetPlayerColor(playerid));
- }
- if(PlayerInfo[playerid][Gangid] == 3)
- {
- GangZoneShowForAll(Zone3, 0x00FF0096);//VERDE
- SetPlayerColor(playerid, 0x00FF0096);
- dini_IntSet(file,"Gang3playercolor",GetPlayerColor(playerid));
- dini_IntSet(file3,"Gang3color",GetPlayerColor(playerid));
- }
- }
- }
- }
- return 0;
- }
- CMD:setgangcolor(playerid,params[])
- {
- if(PlayerInfo[playerid][Gangid] == 0) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You must be in a gang and have at least Owner rank in gang for use this command.");
- if(PlayerInfo[playerid][Gangrank] <= 4) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You need at least Owner rank in gang for change this gang settings.");
- if(PlayerInfo[playerid][Gangid] == 1 && capture1 >= 2) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You need to /capture your gang territory before use this command.");
- if(PlayerInfo[playerid][Gangid] == 2 && capture2 <= 1 && capture2 >= 3) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You need to /capture your gang territory before use this command.");
- if(PlayerInfo[playerid][Gangid] == 3 && capture3 <= 2) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You need to /capture your gang territory before use this command.");
- ShowPlayerDialog(playerid, DIALOG_GANGCOLOR, DIALOG_STYLE_LIST, "Color list", "{FF0000}Red\n{0000FF}Blue\n{FFFFFF}White\n{FFFF00}Yellow\n{FF3300}Orange\n{C601DD}Purple\n{38F900}Green", "Select", "Close");
- return 1;
- }
- CMD:setrank(playerid,params[])
- {
- new targetID;
- if(PlayerInfo[playerid][Gangid] == 0) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You must be in a gang to use this command.");
- if(PlayerInfo[playerid][Gangrank] <= 2) return SendClientMessage(playerid, 0xff0000ff, "ERROR: Your need Leader rank in gang for use this command.");
- if(sscanf(params, "u", targetID)) return SendClientMessage(playerid, -1, "{FF0000}USAGE: {FFFFFF}/Setrank [playerid]");
- if(!IsPlayerConnected(targetID)) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}That player isn't connected.");
- if(PlayerInfo[playerid][Gangrank] <= PlayerInfo[targetID][Gangrank]) return SendClientMessage(playerid, 0xff0000ff, "ERROR: You can't change this player rank.");
- gangRankTargetID = targetID;
- ShowPlayerDialog(playerid,DIALOG_GRANK,DIALOG_STYLE_LIST, "Set Gang Rank", "Member\nCo-leader\nLeader\nCo-Owner\nOwner\n{FF0000}Founder", "Select", "Close");
- return 1;
- }
- stock GetName(playerid)
- {
- new pName[24];
- GetPlayerName(playerid, pName, 24);
- return pName;
- }
- forward TimeOnServer(playerid);
- public TimeOnServer(playerid)
- {
- PlayerInfo[playerid][Sec] +=1;
- if(PlayerInfo[playerid][Sec]>=60)
- {
- PlayerInfo[playerid][Min]++;
- PlayerInfo[playerid][Sec]=0;
- }
- if(PlayerInfo[playerid][Min]>=60)
- {
- PlayerInfo[playerid][Min]=0;
- PlayerInfo[playerid][Hour]++;
- }
- }
Add Comment
Please, Sign In to add comment