Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Z#include <a_samp>
- #include <streamer>
- #define SPAWN 19980
- #define CAPTURE 19981
- #define LOOT 19982
- #define HOUSE 19983
- #define HEALTH 19984
- #define ARMOUR 19985
- #define MINIGUN 19986
- #define ROCKET 19987
- #define GATE 19988
- #define BASE 19989
- #define EDITGANG 19990
- #define GANGBASE 19991
- #define TELEPORTS 19992
- #define VEHICLES 19993
- #define TERRITORY 19994
- #define RED 0xFF0000FF
- //------------------------------------//
- new tp; // //
- new tp1; // //
- new tp2; // //
- new tp3; // //
- new tp4; // //
- new tp5; // TELEPORTS //
- new tp6; // //
- new tp7; // //
- new tp8; // //
- new tp9; // //
- new tp10; // //
- new Text3D:ltp; // //
- new Text3D:ltp1; // //
- new Text3D:ltp2; // //
- new Text3D:ltp3; // //
- new Text3D:ltp4; // //
- new Text3D:ltp5; // TELEPORT //
- new Text3D:ltp6; // TEXTS //
- new Text3D:ltp7; // //
- new Text3D:ltp8; // //
- new Text3D:ltp9; // //
- new Text3D:ltp10; // //
- new teleport0; // Create Teleport Protection #0 //
- new teleport1; // Create Teleport Protection #1 //
- new teleport2; // Create Teleport Protection #2 //
- new teleport3; // Create Teleport Protection #3 //
- new teleport4; // Create Teleport Protection #4 //
- new teleport5; // Create Teleport Protection #5 //
- new teleport6; // Create Teleport Protection #6 //
- new teleport7; // Create Teleport Protection #7 //
- new teleport8; // Create Teleport Protection #8 //
- new teleport9; // Create Teleport Protection #9 //
- new teleport10; // Create Teleport Protection #10 //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Float:posX; // //
- new Float:posY; // //
- new Float:posZ; // Gang //
- new Float:posA; // Spawn //
- new GangSpawn; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Float:posX0; // //
- new Float:posY0; // //
- new Float:posZ0; // Teleport //
- new Float:posA0; // #0 //
- new Teleport0; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Float:posX1; // //
- new Float:posY1; // //
- new Float:posZ1; // Teleport //
- new Float:posA1; // #1 //
- new Teleport1; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Float:posX2; // //
- new Float:posY2; // //
- new Float:posZ2; // Teleport //
- new Float:posA2; // #2 //
- new Teleport2; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Float:posX3; // //
- new Float:posY3; // //
- new Float:posZ3; // Teleport //
- new Float:posA3; // #3 //
- new Teleport3; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Float:posX4; // //
- new Float:posY4; // //
- new Float:posZ4; // Teleport //
- new Float:posA4; // #4 //
- new Teleport4; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Float:posX5; // //
- new Float:posY5; // //
- new Float:posZ5; // Teleport //
- new Float:posA5; // #5 //
- new Teleport5; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Float:posX6; // //
- new Float:posY6; // //
- new Float:posZ6; // Teleport //
- new Float:posA6; // #6 //
- new Teleport6; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Float:posX7; // //
- new Float:posY7; // //
- new Float:posZ7; // Teleport //
- new Float:posA7; // #7 //
- new Teleport7; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Float:posX8; // //
- new Float:posY8; // //
- new Float:posZ8; // Teleport //
- new Float:posA8; // #8 //
- new Teleport8; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Float:posX9; // //
- new Float:posY9; // //
- new Float:posZ9; // Teleport //
- new Float:posA9; // #9 //
- new Teleport9; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Float:posX10; // //
- new Float:posY10; // //
- new Float:posZ10; // Teleport //
- new Float:posA10; // #10 //
- new Teleport10; // //
- //--------------------------------------------------------------//
- //----------------------------------//
- new hp; // Health //
- new ar; // Pickups //
- new mg; // Weapon //
- new rk; // Pickups //
- new gate; // Gate Creator //
- new Text3D:ganggate;// Gate Text //
- new Text3D:thouse; // Gang House //
- new ghouse; // Pickup //
- new Text3D:textloot;// Loot //
- new loot; // Pickup //
- new capture; // Capture //
- new captureicon; // Icon //
- new Text3D:capturet;// Pickup //
- new capturecp; // Capture //
- new capturetimer; // Protection //
- new capturearea, bool:isincapturearea;
- //----------------------------------------------------------------------//
- //----------------------------------------------------------------------//
- new heal_timer[MAX_PLAYERS]; // Heal Pickups //
- new armour_timer[MAX_PLAYERS]; // Cooldown //
- new minigun_timer[MAX_PLAYERS]; // Weapons Pickups //
- new rocket_timer[MAX_PLAYERS]; // Cooldown //
- //----------------------------------------------------------------------//
- //----------------------------------------------------------------------//
- new Float:posX11; // //
- new Float:posY11; // //
- new Float:posZ11; // BASE //
- new Float:posA11; // //
- new Base; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Makingzone; // //
- new Float:ZMinX; // //
- new Float:ZMaxX; // //
- new Float:ZMinY; // Create //
- new Float:ZMaxY; // Territory //
- new GangZone; // //
- new Create; // //
- new Tprotection;
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- public OnFilterScriptExit()
- {
- DestroyDynamicCP(tp); //--------------------------------//
- DestroyDynamicCP(tp1); // //
- DestroyDynamicCP(tp2); // //
- DestroyDynamicCP(tp3); // //
- DestroyDynamicCP(tp4); // //
- DestroyDynamicCP(tp5); // //
- DestroyDynamicCP(tp6); // //
- DestroyDynamicCP(tp7); // //
- DestroyDynamicCP(tp8); // //
- DestroyDynamicCP(tp9); // //
- DestroyDynamicCP(tp10); // //
- DestroyDynamic3DTextLabel(ltp); // //
- DestroyDynamic3DTextLabel(ltp1); // //
- DestroyDynamic3DTextLabel(ltp2); // //
- DestroyDynamic3DTextLabel(ltp3); // //
- DestroyDynamic3DTextLabel(ltp4); //--------------------------------//
- DestroyDynamic3DTextLabel(ltp5); // Destroy everythink //
- DestroyDynamic3DTextLabel(ltp6); // after reload //
- DestroyDynamic3DTextLabel(ltp7); //--------------------------------//
- DestroyDynamic3DTextLabel(ltp8); // //
- DestroyDynamic3DTextLabel(ltp9); // //
- DestroyDynamic3DTextLabel(ltp10); // //
- DestroyDynamic3DTextLabel(ganggate); // //
- DestroyDynamic3DTextLabel(textloot); // //
- DestroyDynamic3DTextLabel(thouse); // //
- DestroyDynamic3DTextLabel(capturet); // //
- DestroyDynamicPickup(hp); // //
- DestroyDynamicPickup(ar); // //
- DestroyDynamicPickup(loot); // //
- DestroyDynamicPickup(capture); // //
- DestroyDynamicPickup(ghouse); // //
- DestroyDynamicPickup(mg); // //
- DestroyDynamicPickup(rk); // //
- DestroyDynamicPickup(mg); // //
- DestroyDynamicObject(gate); // //
- DestroyDynamicPickup(rk); // //
- DestroyDynamicMapIcon(captureicon); // //
- GangZoneHideForAll(GangZone); //--------------------------------//
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- if(GangSpawn == 0) SetPlayerPos(playerid,-2226.6367, 95.9487, 1036.0600),SetPlayerInterior(playerid, 1),SetPlayerFacingAngle(playerid, 0),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid, 0);
- if(GangSpawn == 1) SetPlayerPos(playerid, posX, posY, posZ+0.10),SetPlayerFacingAngle(playerid, posA),SetCameraBehindPlayer(playerid),ResetPlayerWeapons(playerid),GivePlayerWeapon(playerid,9,1),GivePlayerWeapon(playerid,24,6000),GivePlayerWeapon(playerid,26,6000),GivePlayerWeapon(playerid,32,6000),GivePlayerWeapon(playerid,31,6000),GivePlayerWeapon(playerid,34,6000);
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/editgang", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- ShowPlayerDialog(playerid, EDITGANG ,DIALOG_STYLE_LIST,"{FF0000}EDIT GANG {FFFFFF}panel","{FF0000}Set Spawn\n{FF0000}Set Capture\n{FF0000}Set Gang House\n{FF0000}Set Base\n{FF0000}Set Loot\n{FF0000}Set Health\n{FF0000}Set Armour\n{FF0000}Set Minigun\n{FF0000}Set Rocket\n{FF0000}Remove Vehicles\n{FF0000}Set Vehicle\n{FF0000}Remove Teleports\n{FF0000}Set Teleport\n{FF0000}Set Territory\n{FF0000}Reload Gate","Select","Close");
- }
- else
- {
- }
- return 1;
- }
- if (strcmp("/base", cmdtext, true, 10) == 0)
- {
- ShowPlayerDialog(playerid, GANGBASE ,DIALOG_STYLE_LIST,"Base Teleports","{FFFF00}Gang Name","Teleport","Close");
- return 1;
- }
- if (strcmp("/gtloc 0", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- new string[128];
- if(Teleport0 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
- GetPlayerPos(playerid, posX0, posY0, posZ0),GetPlayerFacingAngle(playerid, posA1);
- Teleport0 = 1;
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
- }
- else
- {
- }
- return 1;
- }
- if (strcmp("/gtloc 1", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- new string[128];
- if(Teleport1 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
- GetPlayerPos(playerid, posX1, posY1, posZ1),GetPlayerFacingAngle(playerid, posA1);
- Teleport1 = 1;
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
- }
- else
- {
- }
- return 1;
- }
- if (strcmp("/gtloc 2", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- new string[128];
- if(Teleport2 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
- GetPlayerPos(playerid, posX2, posY2, posZ2),GetPlayerFacingAngle(playerid, posA2);
- Teleport2 = 1;
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
- }
- else
- {
- }
- return 1;
- }
- if (strcmp("/gtloc 3", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- new string[128];
- if(Teleport3 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
- GetPlayerPos(playerid, posX3, posY3, posZ3),GetPlayerFacingAngle(playerid, posA3);
- Teleport3 = 1;
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
- }
- else
- {
- }
- return 1;
- }
- if (strcmp("/gtloc 4", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- new string[128];
- if(Teleport4 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
- GetPlayerPos(playerid, posX4, posY4, posZ4),GetPlayerFacingAngle(playerid, posA4);
- Teleport4 = 1;
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
- }
- else
- {
- }
- return 1;
- }
- if (strcmp("/gtloc 5", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- new string[128];
- if(Teleport5 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
- GetPlayerPos(playerid, posX5, posY5, posZ5),GetPlayerFacingAngle(playerid, posA5);
- Teleport5 = 1;
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
- }
- else
- {
- }
- return 1;
- }
- if (strcmp("/gtloc 6", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- new string[128];
- if(Teleport6 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
- GetPlayerPos(playerid, posX6, posY6, posZ6),GetPlayerFacingAngle(playerid, posA6);
- Teleport6 = 1;
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
- }
- else
- {
- }
- return 1;
- }
- if (strcmp("/gtloc 7", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- new string[128];
- if(Teleport7 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
- SetPlayerPos(playerid, posX7, posY7, posZ7),GetPlayerFacingAngle(playerid, posA7);
- Teleport7 = 1;
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
- }
- else
- {
- }
- return 1;
- }
- if (strcmp("/gtloc 8", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- new string[128];
- if(Teleport8 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
- GetPlayerPos(playerid, posX8, posY8, posZ8),GetPlayerFacingAngle(playerid, posA8);
- Teleport8 = 1;
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
- }
- else
- {
- }
- return 1;
- }
- if (strcmp("/gtloc 9", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- new string[128];
- if(Teleport9 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
- GetPlayerPos(playerid, posX9, posY9, posZ9),GetPlayerFacingAngle(playerid, posA9);
- Teleport9 = 1;
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
- }
- else
- {
- }
- return 1;
- }
- if (strcmp("/gtloc 10", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- new string[128];
- if(Teleport10 > 0)return format(string, sizeof(string), "ERROR: You can use this command only once!"),SendClientMessage(playerid, 0xFF0000FF, string);
- GetPlayerPos(playerid, posX10, posY10, posZ10),GetPlayerFacingAngle(playerid, posA10);
- Teleport10 = 1;
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport saved!");
- }
- else
- {
- }
- return 1;
- }
- if(strcmp("/capture", cmdtext, true, 10) == 0)
- {
- if(isincapturearea) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not near the capture pickup!");
- {
- new name[24], string[64], string1[64];
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerName( playerid, name, 24 );
- GangZoneFlashForAll(GangZone,RED);
- captureicon = CreateDynamicMapIcon(x, y, z, 61, -1, -1, -1, -1, 25, MAPICON_LOCAL, -1, 0);
- capturecp = CreateDynamicCP(x, y, z-0.90, 8, -1, -1, -1, 25, -1, 0);
- format(string, sizeof(string), "~r~Capture started ~n~~y~by ~b~%s", name,GetPlayerColor(playerid));
- GameTextForAll(string, 5000, 3);
- format(string1,sizeof(string1), "Capturing by: {005AFF}%s", name);
- UpdateDynamic3DTextLabelText(capturet, 0xFF0000FF, string1);
- capturetimer = SetTimer("captured",10000,false);
- }
- return 1;
- }
- ////////////////////////////////////////////////////////////////////////////////
- // You have to manualy update gate direction once you add a new one everytime //
- ////////////////////////////////////////////////////////////////////////////////
- if(strcmp("/og", cmdtext, true, 10) == 0)
- {
- if(IsPlayerInRangeOfPoint(playerid, 15, 2427.0613, 1703.8450, 12.4313))
- {
- MoveDynamicObject(gate, 2427.0613, 1703.8450, 17.8860, 3, 0.0000, 0.0000, 0.0000);
- }
- else
- {
- SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not near any gate");
- }
- return 1;
- }
- if(strcmp("/cg", cmdtext, true, 10) == 0)
- {
- if(IsPlayerInRangeOfPoint(playerid, 15, 2427.0613, 1703.8450, 12.4313))
- {
- MoveDynamicObject(gate, 2427.0613, 1703.8450, 12.4313, 3, 0.0000, 0.0000, 0.0000);
- }
- else
- {
- SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not near any gate");
- }
- return 1;
- }
- return 0;
- }
- ////////////////////////////////////////////////////////////////////////////////
- // You have to manualy update gate direction once you add a new one everytime //
- ////////////////////////////////////////////////////////////////////////////////
- public OnPlayerPickUpDynamicPickup(playerid, pickupid)
- {
- if(pickupid == hp)
- {
- if(heal_timer[playerid] > 0)return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can heal only once every 30 seconds!");
- SetPlayerHealth(playerid,100),GameTextForPlayer(playerid, "~r~~h~Hp Filled", 2500, 3),heal_timer[playerid] = SetTimer("heal",30000,true);
- }
- if(pickupid == ar)
- {
- if(armour_timer[playerid] > 0)return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can heal only once every 30 seconds!");
- SetPlayerArmour(playerid,100),GameTextForPlayer(playerid, "~b~~h~Armour Filled", 2500, 3),armour_timer[playerid] = SetTimer("armour",30000,true);
- }
- if(pickupid == mg)
- {
- if(minigun_timer[playerid] > 0)return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can load this gun only once every 1 minute!");
- GivePlayerWeapon(playerid, 38, 50),GameTextForPlayer(playerid, "~g~Gun loaded", 2500, 3),minigun_timer[playerid] = SetTimer("minigun",60000,true);
- }
- if(pickupid == rk)
- {
- if(rocket_timer[playerid] > 0)return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can load this gun only once every 1 minute!");
- GivePlayerWeapon(playerid, 35, 10),GameTextForPlayer(playerid, "~g~Gun loaded", 2500, 3),rocket_timer[playerid] = SetTimer("rocket",60000,true);
- }
- if(pickupid == ghouse)
- {
- }
- if(pickupid == loot)
- {
- }
- if(pickupid == capture)
- {
- }
- return 1;
- }
- public OnPlayerEnterDynamicCP(playerid, checkpointid)
- {
- if(checkpointid == tp)
- {
- if(Teleport0 == 1)SetPlayerPos(playerid, posX0, posY0, posZ0),SetPlayerFacingAngle(playerid, posA0),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
- }
- if(checkpointid == tp1)
- {
- if(Teleport1 == 1) SetPlayerPos(playerid, posX1, posY1, posZ1),SetPlayerFacingAngle(playerid, posA1),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
- }
- if(checkpointid == tp2)
- {
- if(Teleport2 == 1)SetPlayerPos(playerid, posX2, posY2, posZ2),SetPlayerFacingAngle(playerid, posA2),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
- }
- if(checkpointid == tp3)
- {
- if(Teleport3 == 1)SetPlayerPos(playerid, posX3, posY3, posZ3),SetPlayerFacingAngle(playerid, posA3),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
- }
- if(checkpointid == tp4)
- {
- if(Teleport4 == 1)SetPlayerPos(playerid, posX4, posY4, posZ4),SetPlayerFacingAngle(playerid, posA4),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
- }
- if(checkpointid == tp5)
- {
- if(Teleport5 == 1)SetPlayerPos(playerid, posX5, posY5, posZ5),SetPlayerFacingAngle(playerid, posA5),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
- }
- if(checkpointid == tp6)
- {
- if(Teleport6 == 1)SetPlayerPos(playerid, posX6, posY6, posZ6),SetPlayerFacingAngle(playerid, posA6),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
- }
- if(checkpointid == tp7)
- {
- if(Teleport7 == 1)SetPlayerPos(playerid, posX7, posY7, posZ7),SetPlayerFacingAngle(playerid, posA7),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
- }
- if(checkpointid == tp8)
- {
- if(Teleport8 == 1)SetPlayerPos(playerid, posX8, posY8, posZ8),SetPlayerFacingAngle(playerid, posA8),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
- }
- if(checkpointid == tp9)
- {
- if(Teleport9 == 1)SetPlayerPos(playerid, posX9, posY9, posZ9),SetPlayerFacingAngle(playerid, posA9),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
- }
- if(checkpointid == tp10)
- {
- if(Teleport10 == 1)SetPlayerPos(playerid, posX10, posY10, posZ10),SetPlayerFacingAngle(playerid, posA10),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0);
- }
- if(checkpointid == capturecp)
- {
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == SPAWN)// Save Spawn //
- {
- if(response)
- {
- if(listitem == 0)//SET SPAWN
- {
- GetPlayerPos(playerid, posX, posY, posZ),GetPlayerFacingAngle(playerid, posA),SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Spawn saved!"),GangSpawn = 1;
- }
- if(listitem == 1)//RESET SPAWN
- {
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Spawn reset!"),GangSpawn = 0;
- }
- }
- return 1;
- }
- if(dialogid == CAPTURE)// Set Capture //
- {
- if(response)
- {
- if(listitem == 0)//SET CAPTURE
- {
- DestroyDynamicPickup(capture);
- DestroyDynamic3DTextLabel(capturet);
- DestroyDynamicArea(capturearea);
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- capture = CreateDynamicPickup(1314, 1, x, y, z, -1);
- capturet = CreateDynamic3DTextLabel("{FF0000}/capture", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
- capturearea = CreateDynamicCircle(x, y, 0.50, -1, -1, -1);
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Capture saved!");
- }
- if(listitem == 1)//DESTROY CAPTURE
- {
- DestroyDynamicPickup(capture);
- DestroyDynamic3DTextLabel(capturet);
- DestroyDynamicArea(capturearea);
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Capture destroyed!");
- }
- }
- return 1;
- }
- if(dialogid == HOUSE)// Set House //
- {
- if(response)
- {
- if(listitem == 0)//SET HOUSE
- {
- DestroyDynamicPickup(ghouse);
- DestroyDynamic3DTextLabel(thouse);
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- ghouse = CreateDynamicPickup(1239, 1, x, y, z, -1);
- thouse = CreateDynamic3DTextLabel("{FFFF00}/enter\n{FFFFFF}Gang House", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, 0);
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Gang House saved!");
- }
- if(listitem == 1)//DESTROY HOUSE
- {
- DestroyDynamicPickup(ghouse);
- DestroyDynamic3DTextLabel(thouse);
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Gang House destroyed!");
- }
- }
- return 1;
- }
- if(dialogid == BASE)// Set Base //
- {
- if(response)
- {
- if(listitem == 0)//SET BASE
- {
- GetPlayerPos(playerid, posX11, posY11, posZ11),GetPlayerFacingAngle(playerid, posA11),SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Base saved!"),Base = 1;
- }
- if(listitem == 1)//RESET BASE
- {
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Base reset!"),Base = 0;
- }
- }
- return 1;
- }
- if(dialogid == LOOT)// Set Loot //
- {
- if(response)
- {
- if(listitem == 0)//SET LOOT
- {
- DestroyDynamicPickup(loot);
- DestroyDynamic3DTextLabel(textloot);
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- loot = CreateDynamicPickup(1550, 1, x, y, z, -1);
- textloot = CreateDynamic3DTextLabel("{CC9900}Gang Loot \n{FFFFFF}Money: {FF0000}999999999{FFFFFF}, Coins: {FF0000}123456789{FFFFFF}, Gems: {FF0000}1337\n{FFFFFF}/loot", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, 0);
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Loot saved!");
- }
- if(listitem == 1)//DESTROY LOOT
- {
- DestroyDynamicPickup(loot);
- DestroyDynamic3DTextLabel(textloot);
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Loot destroyed!");
- }
- }
- return 1;
- }
- if(dialogid == HEALTH)// Set Health //
- {
- if(response)
- {
- if(listitem == 0)//SET HEALTH
- {
- DestroyDynamicPickup(hp);
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- hp = CreateDynamicPickup(1240, 1, x, y, z, -1);
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Health saved!");
- }
- if(listitem == 1)//DESTROY HEALTH
- {
- DestroyDynamicPickup(hp);
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Health destroyed!");
- }
- }
- return 1;
- }
- if(dialogid == ARMOUR)// Set Armour //
- {
- if(response)
- {
- if(listitem == 0)//SET ARMOUR
- {
- DestroyDynamicPickup(ar);
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- ar = CreateDynamicPickup(1242, 1, x, y, z, -1);
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Armour saved!");
- }
- if(listitem == 1)//DESTROY ARMOUR
- {
- DestroyDynamicPickup(ar);
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Armour destroyed!");
- }
- }
- return 1;
- }
- if(dialogid == MINIGUN)// Set Minigun //
- {
- if(response)
- {
- if(listitem == 0)//SET MINIGUN
- {
- DestroyDynamicPickup(mg);
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- mg = CreateDynamicPickup(362, 1, x, y, z, -1);
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Minigun saved!");
- }
- if(listitem == 1)//DESTROY MINIGUN
- {
- DestroyDynamicPickup(mg);
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Minigun destroyed!");
- }
- }
- return 1;
- }
- if(dialogid == ROCKET)// Set Rocket //
- {
- if(response)
- {
- if(listitem == 0)//SET MINIGUN
- {
- DestroyDynamicPickup(rk);
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- rk = CreateDynamicPickup(359, 1, x, y, z, -1);
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Rocket saved!");
- }
- if(listitem == 1)//DESTROY MINIGUN
- {
- DestroyDynamicPickup(rk);
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Rocket destroyed!");
- }
- }
- return 1;
- }
- if(dialogid == GATE)// Reload Gate //
- {
- if(response)
- {
- if(listitem == 0)//RELOAD GATE
- {
- //SendClientMessage(playerid, 0xFF0000FF, "ERROR: There is no gate loaded!");
- DestroyDynamicObject(gate);
- DestroyDynamic3DTextLabel(ganggate);
- ganggate = CreateDynamic3DTextLabel("If you are in this gang use {FFFF00}/opengate(/og) {FFFFFF}to open gate \nand {FFFF00}/closegate(/cg) {FFFFFF}to close gate! \n{FF0000}/Blowgate", -1, 2427.06, 1703.84, 12.43, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, 0);
- gate = CreateDynamicObject(980, 2427.06, 1703.84, 12.43, 0.00, 0.00, 0.00);
- SendClientMessage(playerid, 0x00CC3300, "SUCCES: Gate reloaded!");
- }
- if(listitem == 1)//DESTROY GATE
- {
- DestroyDynamicObject(gate);
- DestroyDynamic3DTextLabel(ganggate);
- SendClientMessage(playerid, 0x00CC3300, "SUCCES: Gate destroyed!");
- }
- }
- return 1;
- }
- if(dialogid == EDITGANG)
- {
- if(response)
- {
- if(listitem == 0)//GANG SPAWN
- {
- ShowPlayerDialog(playerid, SPAWN ,DIALOG_STYLE_LIST,"{FF0000}Set Spawn","{FF0000}Set Spawn\n{FF0000}Reset Spawn","Select","Close");
- }
- if(listitem == 1)//GANG CAPTURE
- {
- ShowPlayerDialog(playerid, CAPTURE ,DIALOG_STYLE_LIST,"{FF0000}Set Capture","{FF0000}Set Capture\n{FF0000}Destroy Capture","Select","Close");
- }
- if(listitem == 2)//GANG HOUSE
- {
- ShowPlayerDialog(playerid, HOUSE ,DIALOG_STYLE_LIST,"{FF0000}Set House","{FF0000}Set House\n{FF0000}Destroy House","Select","Close");
- }
- if(listitem == 3)//GANG BASE
- {
- ShowPlayerDialog(playerid, BASE ,DIALOG_STYLE_LIST,"{FF0000}Set Base","{FF0000}Set Base\n{FF0000}Reset Base","Select","Close");
- }
- if(listitem == 4)//GANG LOOT
- {
- ShowPlayerDialog(playerid, LOOT ,DIALOG_STYLE_LIST,"{FF0000}Set Loot","{FF0000}Set Loot\n{FF0000}Destroy Loot","Select","Close");
- }
- if(listitem == 5)//GANG HEALTH
- {
- ShowPlayerDialog(playerid, HEALTH ,DIALOG_STYLE_LIST,"{FF0000}Set Health","{FF0000}Set Health\n{FF0000}Destroy Health","Select","Close");
- }
- if(listitem == 6)//GANG ARMOUR
- {
- ShowPlayerDialog(playerid, ARMOUR ,DIALOG_STYLE_LIST,"{FF0000}Set Armour","{FF0000}Set Armour\n{FF0000}Destroy Armour","Select","Close");
- }
- if(listitem == 7)//GANG MINIGUN
- {
- ShowPlayerDialog(playerid, MINIGUN ,DIALOG_STYLE_LIST,"{FF0000}Set Minigun","{FF0000}Set Minigun\n{FF0000}Destroy Minigun","Select","Close");
- }
- if(listitem == 8)//GANG ROCKET
- {
- ShowPlayerDialog(playerid, ROCKET ,DIALOG_STYLE_LIST,"{FF0000}Set Rocket","{FF0000}Set Rocket\n{FF0000}Destroy Rocket","Select","Close");
- }
- if(listitem == 9)//REMOVE VEHICLES
- {
- DestroyNearbyVehicles(playerid, 250);
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Vehicles removed!");
- }
- if(listitem == 10)//SET VEHICLES
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- ShowPlayerDialog(playerid, VEHICLES, DIALOG_STYLE_INPUT ,"{FF0000}Set Vehicle","Insert vehicle color bellow\n{FFFFFF}Example. carcolor1{FF0000}[colorid], {FFFFFF}carcolor2{FF0000}[colorid]","Create","Close");
- }
- else
- {
- SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not in a vehicle");
- }
- }
- if(listitem == 11)//REMOVE TELEPORTS
- {
- DestroyDynamicCP(tp);
- DestroyDynamicCP(tp1);
- DestroyDynamicCP(tp2);
- DestroyDynamicCP(tp3);
- DestroyDynamicCP(tp4);
- DestroyDynamicCP(tp5);
- DestroyDynamicCP(tp6);
- DestroyDynamicCP(tp7);
- DestroyDynamicCP(tp8);
- DestroyDynamicCP(tp9);
- DestroyDynamicCP(tp10);
- DestroyDynamic3DTextLabel(ltp);
- DestroyDynamic3DTextLabel(ltp1);
- DestroyDynamic3DTextLabel(ltp2);
- DestroyDynamic3DTextLabel(ltp3);
- DestroyDynamic3DTextLabel(ltp4);
- DestroyDynamic3DTextLabel(ltp5);
- DestroyDynamic3DTextLabel(ltp6);
- DestroyDynamic3DTextLabel(ltp7);
- DestroyDynamic3DTextLabel(ltp8);
- DestroyDynamic3DTextLabel(ltp9);
- DestroyDynamic3DTextLabel(ltp10);
- teleport0 = 0;
- teleport1 = 0;
- teleport2 = 0;
- teleport3 = 0;
- teleport4 = 0;
- teleport5 = 0;
- teleport6 = 0;
- teleport7 = 0;
- teleport8 = 0;
- teleport9 = 0;
- teleport10 = 0;
- Teleport0 = 0;
- Teleport1 = 0;
- Teleport2 = 0;
- Teleport3 = 0;
- Teleport4 = 0;
- Teleport5 = 0;
- Teleport6 = 0;
- Teleport7 = 0;
- Teleport8 = 0;
- Teleport9 = 0;
- Teleport10 = 0;
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleports removed!");
- }
- if(listitem == 12)//SET TELEPORTS
- {
- ShowPlayerDialog(playerid, TELEPORTS ,DIALOG_STYLE_LIST ,"{FF0000}Set Teleport","{FF0000}#0\n{FF0000}#1\n{FF0000}#2\n{FF0000}#3\n{FF0000}#4\n{FF0000}#5\n{FF0000}#6\n{FF0000}#7\n{FF0000}#8\n{FF0000}#9\n{FF0000}#10","Create","Close");
- }
- if(listitem == 13)//SET TERRITORY
- {
- ShowPlayerDialog(playerid, TERRITORY, 2,"{FF0000}Set Territory List","{FF0000}Create Territory\n{FF0000}Save Territory\n{FF0000}Destroy Territory","Select","Cancel");
- return 1;
- }
- if(listitem == 14)//RELOAD GATE
- {
- ShowPlayerDialog(playerid, GATE ,DIALOG_STYLE_LIST,"{FF0000}Set Rocket","{FF0000}Reload Gate\n{FF0000}Destroy Gate","Select","Close");
- }
- }
- return 1;
- }
- if(dialogid == GANGBASE)// Save Base Teleport //
- {
- if(response)
- {
- if(Base == 1)
- {
- SetPlayerPos(playerid, posX11, posY11, posZ11),SetPlayerFacingAngle(playerid, posA11),SetPlayerInterior(playerid, 0),SetCameraBehindPlayer(playerid),GameTextForPlayer(playerid,"~g~~h~Teleported",2000,3);
- }
- else
- {
- SendClientMessage(playerid, 0xFF0000FF, "ERROR: Gang Base is not saved!");
- }
- }
- return 1;
- }
- if(dialogid == 1010)// Create Teleport #0 //
- {
- if(response)
- {
- if(teleport0 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- tp = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 25, -1, 0);
- ltp = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
- UpdateDynamic3DTextLabelText(ltp, -1, inputtext);
- SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 0 to save teleport direction!");
- teleport0 = 1;
- }
- return 1;
- }
- if(dialogid == 1011)// Create Teleport #1 //
- {
- if(response)
- {
- if(teleport1 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- tp1 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 25, -1, 0);
- ltp1 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
- UpdateDynamic3DTextLabelText(ltp1, -1, inputtext);
- SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 1 to save teleport direction!");
- teleport1 = 1;
- }
- return 1;
- }
- if(dialogid == 1012)// Create Teleport #2 //
- {
- if(response)
- {
- if(teleport2 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- tp2 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
- ltp2 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
- UpdateDynamic3DTextLabelText(ltp2, -1, inputtext);
- SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 2 to save teleport direction!");
- teleport2 = 1;
- }
- return 1;
- }
- if(dialogid == 1013)// Create Teleport #3 //
- {
- if(response)
- {
- if(teleport3 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- tp3 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
- ltp3 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
- UpdateDynamic3DTextLabelText(ltp3, -1, inputtext);
- SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 3 to save teleport direction!");
- teleport3 = 1;
- }
- return 1;
- }
- if(dialogid == 1014)// Create Teleport #4 //
- {
- if(response)
- {
- if(teleport4 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- tp4 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
- ltp4 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
- UpdateDynamic3DTextLabelText(ltp4, -1, inputtext);
- SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 4 to save teleport direction!");
- teleport4 = 1;
- }
- return 1;
- }
- if(dialogid == 1015)// Create Teleport #5 //
- {
- if(response)
- {
- if(teleport5 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- tp5 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
- ltp5 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
- UpdateDynamic3DTextLabelText(ltp5, -1, inputtext);
- SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 5 to save teleport direction!");
- teleport5 = 1;
- }
- return 1;
- }
- if(dialogid == 1016)// Create Teleport #6 //
- {
- if(response)
- {
- if(teleport6 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- tp6 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
- ltp6 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
- UpdateDynamic3DTextLabelText(ltp6, -1, inputtext);
- SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 6 to save teleport direction!");
- teleport6 = 1;
- }
- return 1;
- }
- if(dialogid == 1017)// Create Teleport #7 //
- {
- if(response)
- {
- if(teleport7 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- tp7 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
- ltp7 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
- UpdateDynamic3DTextLabelText(ltp7, -1, inputtext);
- SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 7 to save teleport direction!");
- teleport7 = 1;
- }
- return 1;
- }
- if(dialogid == 1018)// Create Teleport #8 //
- {
- if(response)
- {
- if(teleport8 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- tp8 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
- ltp8 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
- UpdateDynamic3DTextLabelText(ltp8, -1, inputtext);
- SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 8 to save teleport direction!");
- teleport8 = 1;
- }
- return 1;
- }
- if(dialogid == 1019)// Create Teleport #9 //
- {
- if(response)
- {
- if(teleport9 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- tp9 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
- ltp9 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
- UpdateDynamic3DTextLabelText(ltp9, -1, inputtext);
- SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 9 to save teleport direction!");
- teleport9 = 1;
- }
- return 1;
- }
- if(dialogid == 1020)// Create Teleport #10 //
- {
- if(response)
- {
- if(teleport10 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- tp10 = CreateDynamicCP(x, y, z-0.90, 1, -1, -1, -1, 5, -1, 0);
- ltp10 = CreateDynamic3DTextLabel("", -1, x, y, z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);
- UpdateDynamic3DTextLabelText(ltp10, -1, inputtext);
- SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport createad! - Use /gtloc 10 to save teleport direction!");
- teleport10 = 1;
- }
- return 1;
- }
- if(dialogid == TELEPORTS)// Teleports List //
- {
- if(response)
- {
- if(listitem == 0)// Teleport 0 - Dialog Menu //
- {
- ShowPlayerDialog(playerid, 1010 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
- }
- if(listitem == 1)// Teleport 1 - Dialog Menu //
- {
- ShowPlayerDialog(playerid, 1011 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
- }
- if(listitem == 2)// Teleport 2 - Dialog Menu //
- {
- ShowPlayerDialog(playerid, 1012 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
- }
- if(listitem == 3)// Teleport 3 - Dialog Menu //
- {
- ShowPlayerDialog(playerid, 1013 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
- }
- if(listitem == 4)// Teleport 4 - Dialog Menu //
- {
- ShowPlayerDialog(playerid, 1014 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
- }
- if(listitem == 5)// Teleport 5 - Dialog Menu //
- {
- ShowPlayerDialog(playerid, 1015 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
- }
- if(listitem == 6)// Teleport 6 - Dialog Menu //
- {
- ShowPlayerDialog(playerid, 1016 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
- }
- if(listitem == 7)// Teleport 7 - Dialog Menu //
- {
- ShowPlayerDialog(playerid, 1017 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
- }
- if(listitem == 8)// Teleport 8 - Dialog Menu //
- {
- ShowPlayerDialog(playerid, 1018 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
- }
- if(listitem == 9)// Teleport 9 - Dialog Menu //
- {
- ShowPlayerDialog(playerid, 1019 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
- }
- if(listitem == 10)// Teleport 10 - Dialog Menu //
- {
- ShowPlayerDialog(playerid, 1020 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
- }
- }
- return 1;
- }
- if(dialogid == VEHICLES)
- {
- if(response)
- {
- new CarSpawned[MAX_PLAYERS],currentveh;
- new Float: Pos[4];
- new vid = GetVehicleModel(GetPlayerVehicleID(playerid));
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- GetPlayerFacingAngle(playerid, Pos[3]);
- GetVehicleZAngle(vid,Pos[3]);
- currentveh = GetPlayerVehicleID(playerid);
- DestroyVehicle(currentveh);
- CarSpawned[playerid] = AddStaticVehicleEx(vid, Pos[0], Pos[1], Pos[2], Pos[3], strval(inputtext),strval(inputtext), 0);
- LinkVehicleToInterior(CarSpawned[playerid], 0);
- SendClientMessage(playerid,0x00CC3300, "SUCCESS: Vehicle created!");
- }
- return 1;
- }
- if(dialogid == TERRITORY)
- {
- if(response)
- {
- if(listitem == 0)
- {
- if(Tprotection > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You already create an territory!");
- if(Makingzone == 1) return SendClientMessage(playerid,0xFF0000FF,"ERROR: You already created an zone! Remove it and try again!");
- ShowPlayerDialog(playerid,1,2,"{FF0000}Territory Colors","Blue\nRed\nGreen\nPurple\nYellow\nGrey\nLightblue\nWhite\nBlack","Select","Cancel");
- Makingzone = 1;
- Tprotection = 1;
- }
- if(listitem == 1)
- {
- if(Makingzone == 0) return SendClientMessage(playerid,0xFF0000FF,"ERROR: Create one first and try again!");
- new string[128];
- KillTimer(Create);
- format(string,sizeof(string),"GangZoneCreate(%f,%f,%f,%f);\r\n",ZMinX,ZMinY,ZMaxX,ZMaxY);
- SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory saved!");
- Makingzone = 0;
- }
- if(listitem == 2)
- {
- KillTimer(Create);
- Makingzone = 0;
- Tprotection = 0;
- GangZoneDestroy(GangZone);
- SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory destroyed!");
- }
- }
- }
- if(dialogid == 01)
- {
- if(response)
- {
- if(listitem == 0)
- {
- new Float:Z;
- new color;
- GetPlayerPos(playerid,ZMinX,ZMinY,Z);
- color = 0x0000FFAA;
- GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
- GangZoneShowForAll(GangZone,color);
- Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
- SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
- }
- if(listitem == 1)
- {
- new Float:Z;
- new color;
- GetPlayerPos(playerid,ZMinX,ZMinY,Z);
- color = 0xFF0000AA;
- GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
- GangZoneShowForAll(GangZone,color);
- Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
- SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
- }
- if(listitem == 2)
- {
- new Float:Z;
- new color;
- GetPlayerPos(playerid,ZMinX,ZMinY,Z);
- color = 0x00FF00AA;
- GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
- GangZoneShowForAll(GangZone,color);
- Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
- SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
- }
- if(listitem == 3)
- {
- new Float:Z;
- new color;
- GetPlayerPos(playerid,ZMinX,ZMinY,Z);
- color = 0xFF00FFAA;
- GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
- GangZoneShowForAll(GangZone,color);
- Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
- SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
- }
- if(listitem == 4)
- {
- new Float:Z;
- new color;
- GetPlayerPos(playerid,ZMinX,ZMinY,Z);
- color = 0xFFFF00AA;
- GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
- GangZoneShowForAll(GangZone,color);
- Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
- SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
- }
- if(listitem == 5)
- {
- new Float:Z;
- new color;
- GetPlayerPos(playerid,ZMinX,ZMinY,Z);
- color = 0x888888AA;
- GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
- GangZoneShowForAll(GangZone,color);
- Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
- SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
- }
- if(listitem == 6)
- {
- new Float:Z;
- new color;
- GetPlayerPos(playerid,ZMinX,ZMinY,Z);
- color = 0x00FFFFAA;
- GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
- GangZoneShowForAll(GangZone,color);
- Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
- SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
- }
- if(listitem == 7)
- {
- new Float:Z;
- new color;
- GetPlayerPos(playerid,ZMinX,ZMinY,Z);
- color = 0xFFFFFFAA;
- GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
- GangZoneShowForAll(GangZone,color);
- Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
- SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
- }
- if(listitem == 8)
- {
- new Float:Z;
- new color;
- GetPlayerPos(playerid,ZMinX,ZMinY,Z);
- color = 0x000000AA;
- GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
- GangZoneShowForAll(GangZone,color);
- Create = SetTimerEx("Createzone",100,1,"ud",playerid,color);
- SendClientMessage(playerid,0x00CC3300,"SUCCESS: Territory created! Now check the minimap and use /editgang to save the size of the territory!");
- }
- }
- else if(!response)
- {
- Makingzone = 0;
- }
- }
- return 0;
- }
- forward Createzone(playerid,color);
- public Createzone(playerid,color)
- {
- GangZoneHideForAll(GangZone);
- GangZoneDestroy(GangZone);
- new Float:Z;
- GetPlayerPos(playerid,ZMaxX,ZMaxY,Z);
- GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY);
- GangZoneShowForAll(GangZone,color);
- return 1;
- }
- stock IsPlayerInGangZone(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
- {
- new Float:xx, Float:yy, Float:zz;
- GetPlayerPos(playerid, xx, yy, zz);
- if (xx > minx && xx < maxx && yy > miny && yy < maxy) return 1;
- return 0;
- }
- public OnPlayerLeaveDynamicCP(playerid, checkpointid)
- {
- if(checkpointid == capturecp)
- {
- DestroyDynamicCP(capturecp);
- GangZoneStopFlashForAll(GangZone);
- GameTextForPlayer(playerid, "~r~capture failed", 2500, 3);
- UpdateDynamic3DTextLabelText(capturet, 0xFF0000FF, "/capture");
- KillTimer(capturetimer);
- DestroyDynamicMapIcon(captureicon);
- }
- return 1;
- }
- public OnPlayerEnterDynamicArea(playerid, areaid)
- {
- if(areaid == capturearea)
- {
- isincapturearea = false;
- }
- }
- public OnPlayerLeaveDynamicArea(playerid, areaid)
- {
- if(areaid == capturearea)
- {
- isincapturearea = true;
- }
- }
- forward heal(playerid);
- public heal(playerid)
- {
- heal_timer[playerid] = 0;
- KillTimer(heal_timer[playerid]);
- return 1;
- }
- forward armour(playerid);
- public armour(playerid)
- {
- armour_timer[playerid] = 0;
- KillTimer(armour_timer[playerid]);
- return 1;
- }
- forward minigun(playerid);
- public minigun(playerid)
- {
- minigun_timer[playerid] = 0;
- KillTimer(minigun_timer[playerid]);
- return 1;
- }
- forward rocket(playerid);
- public rocket(playerid)
- {
- rocket_timer[playerid] = 0;
- KillTimer(rocket_timer[playerid]);
- return 1;
- }
- forward captured(playerid);
- public captured(playerid)
- {
- GangZoneShowForAll(GangZone,GetPlayerColor(playerid));
- GameTextForPlayer(playerid, "~r~successfully captured!", 2500, 3);
- KillTimer(capturetimer);
- DestroyDynamicCP(capturecp);
- UpdateDynamic3DTextLabelText(capturet, 0xFF0000FF, "/capture");
- DestroyDynamicMapIcon(captureicon);
- return 1;
- }
- stock DestroyNearbyVehicles(playerid, Float:radi)
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- for(new i=1; i<MAX_VEHICLES; i++)
- {
- if(GetVehicleModel(i))
- {
- new Float:posx, Float:posy, Float:posz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetVehiclePos(i, posx, posy, posz);
- tempposx = (posx - x);
- tempposy = (posy - y);
- tempposz = (posz - z);
- if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- {
- DestroyVehicle(i);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement