Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #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 GCMDS 19995
- #define SETTINGS 19996
- #define RED 0xFF0000FF
- //----------------------------------------------------------------------------//
- #define DIALOG_MENU 1678
- #define DIALOG_MOVE_SPEED 1679
- #define DIALOG_ROT_SPEED 1680
- #define DIALOG_EXPORTNAME 1681
- #define DIALOG_CLOSE_NEW 1682
- #define MOVE_SPEED 100.0
- #define ACCEL_RATE 0.02
- #define CAMERA_MODE_NONE 0
- #define CAMERA_MODE_FLY 1
- #define MOVE_FORWARD 2
- #define MOVE_BACK 3
- #define MOVE_LEFT 4
- #define MOVE_RIGHT 5
- #define MOVE_FORWARD_LEFT 6
- #define MOVE_FORWARD_RIGHT 7
- #define MOVE_BACK_LEFT 8
- #define MOVE_BACK_RIGHT 9
- #define strcpy(%0,%1) strcat((%0[0] = '\0', %0), %1)
- //----------------------------------------------------------------------------//
- const Float:fScale = 5.0;
- new bool:IsCreating[MAX_PLAYERS] = false;
- new bool:IsReSettingStart[MAX_PLAYERS] = false;
- new bool:IsReSettingEnd[MAX_PLAYERS] = false;
- new bool:SettingFirstLoc[MAX_PLAYERS] = false;
- new bool:SettingLastLoc[MAX_PLAYERS] = false;
- new bool:IsCamMoving[MAX_PLAYERS] = false;
- enum noclipenum{cameramode,flyobject,mode,lrold,udold,lastmove,Float:accelmul}
- enum Coordinates{Float:StartX,Float:StartY,Float:StartZ,Float:EndX,Float:EndY,Float:EndZ,Float:StartLookX,Float:StartLookY,Float:StartLookZ,Float:EndLookX,Float:EndLookY,Float:EndLookZ,MoveSpeed,RotSpeed}
- new coordInfo[MAX_PLAYERS][Coordinates],noclipdata[MAX_PLAYERS][noclipenum];
- //----------------------------------------------------------------------------//
- new Float:X; // //
- new Float:Y; // //
- new Float:Z; // //
- new Float:A; // //
- new tp; // //
- new tp1; // //
- new tp2; // //
- new tp3; // //
- new tp4; // //
- new Text3D:ltp; // //
- new Text3D:ltp1; // //
- new Text3D:ltp2; // //
- new Text3D:ltp3; // //
- new Text3D:ltp4; // //
- 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 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:posX11; // //
- new Float:posY11; // //
- new Float:posZ11; // BASE //
- new Float:posA11; // //
- new Base; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Float:posX12; // //
- new Float:posY12; // //
- new Float:posZ12; // Enter //
- new Float:posA12; // Ghouse //
- new Enter; // //
- new Plant; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Float:posX13; // //
- new Float:posY13; // //
- new Float:posZ13; // Exit //
- new Float:posA13; // Ghouse //
- new Exit; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Float:posX14[MAX_PLAYERS]; // //
- new Float:posY14[MAX_PLAYERS]; // //
- new Float:posZ14[MAX_PLAYERS]; // Explode //
- new Eplant; // //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new Text3D:tehouse; // Gang House //
- new Text3D:thouse; // Gang House //
- new Text3D:textloot; // Loot //
- new Text3D:capturet; // Pickup //
- new Text3D:ganggate; // Gate Text //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new bomb; // Bomb //
- new ebomb; // Bomb //
- new hp; // Health //
- new ar; // Pickups //
- new mg; // Weapon //
- new rk; // Pickups //
- new gate; // Gate //
- new ghouse; // Pickup //
- new loot; // Pickup //
- new capture; // Capture //
- new captureicon; // Icon //
- new capturecp; // Capture //
- new capturetimer; // Protection //
- new ghouset; // Protection //
- new ghousetx; // Protection //
- //--------------------------------------------------------------//
- //--------------------------------------------------------------//
- new lootarea, bool:isinlootarea; //Ifplayerisnearthepiokup//
- new capturearea, bool:isincapturearea; //Ifplayerisnearthepiokup//
- new ghousearea, bool:isinghousearea; //Ifplayerisnearthepiokup//
- new eghousearea, bool:isineghousearea; //Ifplayerisnearthepiokup//
- //-------------------------------------------------------------------//
- //-------------------------------------------------------------------//
- 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 Makingzone; // //
- new Float:ZMinX; // //
- new Float:ZMaxX; // //
- new Float:ZMinY; // Create //
- new Float:ZMaxY; // Territory //
- new GangZone; // //
- new Create; // //
- new Tprotection; // //
- //------------------------------------------------------------------//
- forward heal(playerid);
- forward armour(playerid);
- forward minigun(playerid);
- forward rocket(playerid);
- forward captured(playerid);
- forward planted(playerid);
- forward explode(playerid);
- forward defuse(playerid);
- forward Unfreeze(playerid);
- forward Createzone(playerid,color);
- public OnFilterScriptExit()
- {
- for(new x; x<MAX_PLAYERS; x++){if(noclipdata[x][cameramode] == CAMERA_MODE_FLY) CancelFlyMode(x);}
- GangZoneDestroy(GangZone);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- noclipdata[playerid][cameramode] = CAMERA_MODE_NONE;noclipdata[playerid][lrold] = 0;noclipdata[playerid][udold] = 0;noclipdata[playerid][mode] = 0;noclipdata[playerid][lastmove] = 0;noclipdata[playerid][accelmul] = 0.0; coordInfo[playerid][RotSpeed] = 1000;
- IsCreating[playerid] = false;IsReSettingStart[playerid] = false;IsReSettingEnd[playerid] = false;SettingFirstLoc[playerid] = false;SettingLastLoc[playerid] = false;IsCamMoving[playerid] = false;coordInfo[playerid][MoveSpeed] = 1000;
- 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),TogglePlayerControllable(playerid, false),SetTimerEx("Unfreeze", 1000, false, "i", playerid);
- 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),SetPlayerInterior(playerid, 1),GivePlayerWeapon(playerid,34,6000),TogglePlayerControllable(playerid, false),SetTimerEx("Unfreeze", 1000, false, "i", playerid);
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/gec", cmdtext, true, 10) == 0)
- {
- if(IsPlayerInAnyVehicle(playerid))return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can't use the editor inside a vehicle!");
- if(IsCamMoving[playerid] == false){if(GetPVarType(playerid, "FlyMode")){CancelFlyMode(playerid);IsCreating[playerid] = false;}else FlyMode(playerid);
- }
- return 1;
- }
- 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}Reset Teleports\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 Tester V3.2","Teleport","Close");
- return 1;
- }
- if(strcmp("/loot", cmdtext, true, 10) == 0)
- {
- if(isinlootarea) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not near the loot pickup!");
- {
- SendClientMessage(playerid, 0xFF0000FF, "ERROR: No more loot for you! Make more gang points if you want to earn more!");
- }
- return 1;
- }
- if (strcmp("/gtloc 0", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- if(Teleport0 > 0)return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can use this command only once! Remove Teleports and try again!");GetPlayerPos(playerid, posX0, posY0, posZ0),GetPlayerFacingAngle(playerid, posA1),Teleport0 = 1,SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport position set");
- }
- else
- {
- }
- return 1;
- }
- if (strcmp("/gtloc 1", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- if(Teleport1 > 0)return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can use this command only once! Remove Teleports and try again!");GetPlayerPos(playerid, posX1, posY1, posZ1),GetPlayerFacingAngle(playerid, posA1),Teleport1 = 1,SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport position set");
- }
- else
- {
- }
- return 1;
- }
- if (strcmp("/gtloc 2", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- if(Teleport2 > 0)return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can use this command only once! Remove Teleports and try again!");GetPlayerPos(playerid, posX2, posY2, posZ2),GetPlayerFacingAngle(playerid, posA2),Teleport2 = 1,SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport position set");
- }
- else
- {
- }
- return 1;
- }
- if (strcmp("/gtloc 3", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- if(Teleport3 > 0)return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can use this command only once! Remove Teleports and try again!");GetPlayerPos(playerid, posX3, posY3, posZ3),GetPlayerFacingAngle(playerid, posA3),Teleport3 = 1,SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport position set");
- }
- else
- {
- }
- return 1;
- }
- if (strcmp("/gtloc 4", cmdtext, true, 10) == 0)
- {
- if(IsPlayerAdmin(playerid))
- {
- if(Teleport4 > 0)return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can use this command only once! Remove Teleports and try again!");GetPlayerPos(playerid, posX4, posY4, posZ4),GetPlayerFacingAngle(playerid, posA4),Teleport4 = 1,SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport position set");
- }
- else
- {
- }
- return 1;
- }
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- if(strcmp("/capture start", cmdtext, true, 10) == 0)
- {
- if(Makingzone > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can't capture this gang without the territory! Try again later!");
- if(IsPlayerInArea(playerid, ZMinX,ZMinY,ZMaxX,ZMaxY))
- {
- new name[24], string[64], string1[64];
- GetPlayerPos(playerid, X, Y, Z),GetPlayerName( playerid, name, 24 ),GangZoneFlashForAll(GangZone,RED);
- 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\n{FF0000}Time left: {00FF00}%d", name, capturetimer),UpdateDynamic3DTextLabelText(capturet, 0xFF0000FF, string1),capturetimer = SetTimer("captured",10000,false);
- SetPlayerChatBubble(playerid, "Capturing", 0xFF0000FF, 100.0, 10000);
- }
- else
- {
- SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not on a territory!");
- }
- return 1;
- }
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- if(strcmp("/capture", cmdtext, true, 10) == 0)
- {
- if(Makingzone > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can't capture this gang without the territory! Try again later!");
- if(isincapturearea) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not near the capture pickup!");
- {
- new name[24], string[64], string1[64];
- 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\n{FF0000}Time left: {00FF00}%d", name, capturetimer),UpdateDynamic3DTextLabelText(capturet, 0xFF0000FF, string1),capturetimer = SetTimer("captured",10000,false);
- SetPlayerChatBubble(playerid, "Capturing", 0xFF0000FF, 100.0, 10000);
- }
- return 1;
- }
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- if(strcmp("/enter", cmdtext, true, 10) == 0)
- {
- if(isinghousearea) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not near the gang house!");
- if(Enter == 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: House location not set!");
- {
- SetPlayerPos(playerid, posX12, posY12, posZ12),SetPlayerFacingAngle(playerid, posA12),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,1),SetPlayerVirtualWorld(playerid, 1);
- }
- return 1;
- }
- if(strcmp("/exit", cmdtext, true, 10) == 0)
- {
- if(isineghousearea) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not near the gang house!");
- if(Exit == 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: House location not set!");
- {
- SetPlayerPos(playerid, posX13, posY13, posZ13),SetPlayerFacingAngle(playerid, posA13),SetCameraBehindPlayer(playerid),SetPlayerInterior(playerid,0),SetPlayerVirtualWorld(playerid, 0);
- }
- return 1;
- }
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- if(strcmp("/blowgate", cmdtext, true, 10) == 0)
- {
- if(IsPlayerInRangeOfPoint(playerid, 15, 2293.84, 2499.34, 5.57))
- {
- SetPlayerChatBubble(playerid, "Planting", 0xFF0000FF, 100.0, 10000);
- GameTextForPlayer(playerid, "~g~~h~Planting ~n~~r~~h~please wait", 5000, 3),ghouset = SetTimer("planted",10000,false);
- }
- else{SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not near any gate!");}
- return 1;
- }
- if(strcmp("/repairgate", cmdtext, true, 10) == 0)
- {
- if(IsPlayerInRangeOfPoint(playerid, 15, 2293.84, 2499.34, 5.57))
- {
- SetPlayerChatBubble(playerid, "Repairing", 0xFF0000FF, 100.0, 10000);
- GameTextForPlayer(playerid, "~g~~h~Repairing ~n~~r~~h~please wait", 5000, 3),ghousetx = SetTimer("defuse",10000,false);
- }
- else{SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not near any gate!");}
- return 1;
- }
- ////////////////////////^^Replace with the new location^^///////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- if(strcmp("/og", cmdtext, true, 10) == 0)
- {
- if(Plant == 1) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can't use the gate when is destroyed! Use /repairgate to fix it!");
- if(IsPlayerInRangeOfPoint(playerid, 15, 1447.3624, 663.1961, 12.4153))
- {
- MoveDynamicObject(gate, 1447.3624, 663.1961, 6.8769, 3, 0.0000, 0.0000, 180.0000);
- }
- else
- {
- SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not near any gate!");
- }
- return 1;
- }
- ////////////////////////^^Replace with the new gate^^///////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- if(strcmp("/cg", cmdtext, true, 10) == 0)
- {
- if(Plant == 1) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can't use the gate when is destroyed! Use /repairgate to fix it!");
- if(IsPlayerInRangeOfPoint(playerid, 15, 1447.3624, 663.1961, 12.4153))
- {
- MoveDynamicObject(gate, 1447.3624, 663.1961, 12.4153, 3, 0.0000, 0.0000, 180.0000);
- }
- else
- {
- SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not near any gate!");
- }
- return 1;
- }
- ////////////////////////^^Replace with the new gate^^///////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- return 0;
- }
- 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){}
- if(pickupid == bomb){}
- return 1;
- }
- public OnPlayerEnterDynamicCP(playerid, checkpointid)
- {
- if(checkpointid == tp){if(Teleport0 == 1)SetPlayerPos(playerid, posX0, posY0, posZ0),SetPlayerFacingAngle(playerid, posA0),SetPlayerInterior(playerid,0),SetPlayerVirtualWorld(playerid, 0);}
- if(checkpointid == tp1){if(Teleport1 == 1) SetPlayerPos(playerid, posX1, posY1, posZ1),SetPlayerFacingAngle(playerid, posA1),SetPlayerInterior(playerid,0),SetPlayerVirtualWorld(playerid, 0);}
- if(checkpointid == tp2){if(Teleport2 == 1)SetPlayerPos(playerid, posX2, posY2, posZ2),SetPlayerFacingAngle(playerid, posA2),SetPlayerInterior(playerid,0),SetPlayerVirtualWorld(playerid, 0);}
- if(checkpointid == tp3){if(Teleport3 == 1)SetPlayerPos(playerid, posX3, posY3, posZ3),SetPlayerFacingAngle(playerid, posA3),SetPlayerInterior(playerid,0),SetPlayerVirtualWorld(playerid, 0);}
- if(checkpointid == tp4){if(Teleport4 == 1)SetPlayerPos(playerid, posX4, posY4, posZ4),SetPlayerFacingAngle(playerid, posA4),SetPlayerInterior(playerid,0),SetPlayerVirtualWorld(playerid, 0);}
- if(checkpointid == capturecp){}
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == SPAWN)// Save Spawn //
- {
- if(response)
- {
- if(listitem == 0)
- {
- GetPlayerPos(playerid, posX, posY, posZ),GetPlayerFacingAngle(playerid, posA),GetPlayerInterior(playerid),SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Spawn saved!"),GangSpawn = 1;
- }
- if(listitem == 1)
- {
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Spawn reset!"),GangSpawn = 0;
- }
- }
- return 1;
- }
- if(dialogid == CAPTURE)// Set Capture //
- {
- if(response)
- {
- if(listitem == 0){DestroyDynamicPickup(capture),DestroyDynamic3DTextLabel(capturet),DestroyDynamicArea(capturearea);SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Capture on territory saved!");}
- if(listitem == 1){DestroyDynamicPickup(capture),DestroyDynamic3DTextLabel(capturet),DestroyDynamicArea(capturearea),GetPlayerPos(playerid, X, Y, Z),capture = CreateDynamicPickup(1314, 1, X, Y, Z, -1),capturet = CreateDynamic3DTextLabel("{FF0000}/capture", -1, X, Y, Z, 50.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1),capturearea = CreateDynamicCircle(X, Y, 0.50, -1, -1, -1),SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Capture saved!");}
- if(listitem == 2){DestroyDynamicPickup(capture),DestroyDynamic3DTextLabel(capturet),DestroyDynamicArea(capturearea),SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Capture destroyed!");}
- }
- return 1;
- }
- if(dialogid == HOUSE)// Set House //
- {
- if(response)
- {
- if(listitem == 0)
- {
- DestroyDynamicPickup(ghouse),DestroyDynamic3DTextLabel(thouse),GetPlayerPos(playerid, X, Y, Z),ghouse = CreateDynamicPickup(1239, 1, X, Y, Z, -1),ghousearea = CreateDynamicCircle(X, Y, 0.50, -1, -1, -1),GetPlayerPos(playerid, posX13, posY13, posZ13),GetPlayerFacingAngle(playerid, posA13),Exit = 1,SetPlayerInterior(playerid, GetPlayerInterior(playerid));
- thouse = CreateDynamic3DTextLabel("{FFFF00}/enter\n{FFFFFF}Gang House", -1, X, Y, Z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Gang House saved!");
- }
- if(listitem == 1)
- {
- DestroyDynamic3DTextLabel(tehouse),GetPlayerPos(playerid, X, Y, Z),GetPlayerPos(playerid, posX12, posY12, posZ12),GetPlayerFacingAngle(playerid, posA12),Enter = 1,eghousearea = CreateDynamicCircle(X, Y, 0.50, -1, -1, -1),tehouse = CreateDynamic3DTextLabel("Type {FFCC00}/exit {FFFFFF}to exit\nfrom this gang house!", -1, X, Y, Z, 50.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1),SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Gang House Exit saved!");
- }
- if(listitem == 2){DestroyDynamicPickup(ghouse),DestroyDynamic3DTextLabel(thouse),DestroyDynamicArea(eghousearea),SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Gang House destroyed!");}
- if(listitem == 3){DestroyDynamic3DTextLabel(tehouse),DestroyDynamicArea(ghousearea),SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Gang House Exit destroyed!");}
- }
- return 1;
- }
- if(dialogid == BASE)// Set Base //
- {
- if(response)
- {
- if(listitem == 0){GetPlayerPos(playerid, posX11, posY11, posZ11),GetPlayerFacingAngle(playerid, posA11),SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Base saved!"),Base = 1;}
- if(listitem == 1){SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Base reset!"),Base = 0;}
- }
- return 1;
- }
- if(dialogid == LOOT)// Set Loot //
- {
- if(response)
- {
- if(listitem == 0){DestroyDynamicPickup(loot),DestroyDynamic3DTextLabel(textloot),GetPlayerPos(playerid, X, Y, Z),loot = CreateDynamicPickup(1550, 1, X, Y, Z, -1),lootarea = CreateDynamicCircle(X, Y, 0.50, -1, -1, -1),textloot = CreateDynamic3DTextLabel("{CC9900}Gang Loot \n{FFFFFF}Money: {FF0000}0{FFFFFF}, Coins: {FF0000}0{FFFFFF}, Gems: {FF0000}0\n{FF0000}/loot", -1, X, Y, Z, 50.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1),SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Loot saved!");}
- if(listitem == 1){DestroyDynamicArea(lootarea),DestroyDynamicPickup(loot),DestroyDynamic3DTextLabel(textloot),SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Loot destroyed!");}
- }
- return 1;
- }
- if(dialogid == HEALTH)// Set Health //
- {
- if(response)
- {
- if(listitem == 0){DestroyDynamicPickup(hp),GetPlayerPos(playerid, X, Y, Z),hp = CreateDynamicPickup(1240, 1, X, Y, Z, 0),SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Health saved!");}
- if(listitem == 1){DestroyDynamicPickup(hp),SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Health destroyed!");}
- }
- return 1;
- }
- if(dialogid == ARMOUR)// Set Armour //
- {
- if(response)
- {
- if(listitem == 0){DestroyDynamicPickup(ar),GetPlayerPos(playerid, X, Y, Z),ar = CreateDynamicPickup(1242, 1, X, Y, Z, 0),SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Armour saved!");}
- if(listitem == 1){DestroyDynamicPickup(ar),SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Armour destroyed!");}
- }
- return 1;
- }
- if(dialogid == MINIGUN)// Set Minigun //
- {
- if(response)
- {
- if(listitem == 0){DestroyDynamicPickup(mg),GetPlayerPos(playerid, X, Y, Z),mg = CreateDynamicPickup(362, 1, X, Y, Z, -1),SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Minigun saved!");}
- if(listitem == 1){DestroyDynamicPickup(mg),SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Minigun destroyed!");}
- }
- return 1;
- }
- if(dialogid == ROCKET)// Set Rocket //
- {
- if(response)
- {
- if(listitem == 0){DestroyDynamicPickup(rk),GetPlayerPos(playerid, X, Y, Z),rk = CreateDynamicPickup(359, 1, X, Y, Z, -1),SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Rocket saved!");}
- if(listitem == 1){DestroyDynamicPickup(rk),SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Rocket destroyed!");}
- }
- return 1;
- }
- if(dialogid == GATE)// Reload Gate //
- {
- if(response)
- {
- if(listitem == 0){SetPlayerPos(playerid,1447.3624, 663.1961, 12.4153);}
- if(listitem == 1)
- {
- //SendClientMessage(playerid, 0xFF0000FF, "ERROR: There is no gate loaded!");
- DestroyDynamicObject(gate),DestroyDynamic3DTextLabel(ganggate),SendClientMessage(playerid, 0x00CC3300, "SUCCES: Gate reloaded!");
- 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, 1447.3624, 663.1961, 12.4153, 50.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, 0);
- gate = CreateDynamicObject(980, 1447.3624, 663.1961, 12.4153, 0.00, 0.00, 180.00);
- }
- if(listitem == 2){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 on Territory\n{FF0000}Set Capture\n{FF0000}Destroy Capture","Select","Close");
- }
- if(listitem == 2)//GANG HOUSE
- {
- ShowPlayerDialog(playerid, HOUSE ,DIALOG_STYLE_LIST,"{FF0000}Set Gang House","{FF0000}Set Gang House\n{FF0000}Set Gang House Exit\n{FF0000}Destroy Gang House\n{FF0000}Destroy Gang House Exit","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)//RESET TELEPORTS
- {
- if(IsPlayerAdmin(playerid)){Teleport0 = 0,Teleport1 = 0,Teleport2 = 0,Teleport3 = 0,Teleport4 = 0,GameTextForPlayer(playerid, "~g~~h~Successfully!", 5000, 3);}else{}
- }
- if(listitem == 12)//REMOVE TELEPORTS
- {
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleports removed!"),DestroyDynamicCP(tp),DestroyDynamicCP(tp1),DestroyDynamicCP(tp2),DestroyDynamicCP(tp3),DestroyDynamicCP(tp4);
- DestroyDynamic3DTextLabel(ltp),DestroyDynamic3DTextLabel(ltp1),DestroyDynamic3DTextLabel(ltp2),DestroyDynamic3DTextLabel(ltp3),DestroyDynamic3DTextLabel(ltp4);
- teleport0 = 0,teleport1 = 0,teleport2 = 0,teleport3 = 0,teleport4 = 0,Teleport0 = 0,Teleport1 = 0,Teleport2 = 0,Teleport3 = 0,Teleport4 = 0;
- }
- if(listitem == 13)//SET TELEPORTS
- {
- ShowPlayerDialog(playerid, TELEPORTS ,DIALOG_STYLE_LIST ,"{FF0000}Set Teleport","{FF0000}1)\n{FF0000}2)\n{FF0000}3)\n{FF0000}4)\n{FF0000}5)","Create","Close");
- }
- if(listitem == 14)//SET TERRITORY
- {
- ShowPlayerDialog(playerid, TERRITORY, DIALOG_STYLE_LIST,"{FF0000}Set Territory List","{FF0000}Create Territory\n{FF0000}Save Territory\n{FF0000}Destroy Territory","Select","Cancel");
- return 1;
- }
- if(listitem == 15)//RELOAD GATE
- {
- if(teleport0 > 0) ShowPlayerDialog(playerid, 1011 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","\t{CCCCFF}Insert an teleport name bellow\n{FF0000}Hint: {CCCCFF}You can use hexcolor to add color to the text!","Create","Close");
- ShowPlayerDialog(playerid, GATE ,DIALOG_STYLE_LIST,"{FF0000}Set Gate","{FF0000}Goto Gate\n{FF0000}Reload Gate\n{FF0000}Destroy Gate","Select","Close");
- ////////////////////////^^Replace with the new gate^^///////////////////////
- }
- }
- 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 to Base",2000,3);}
- else{SendClientMessage(playerid, 0xFF0000FF, "ERROR: Gang Base is not created!");}
- }
- return 1;
- }
- if(dialogid == 1010)// Create Teleport #1 //
- {
- if(response)
- {
- if(teleport0 > 0) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: This teleport is already created!");GetPlayerPos(playerid,X,Y,Z);tp = CreateDynamicCP(X, Y, Z-0.90, 1, -1, -1, -1, 1, -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 created successfully! Now, use command /gtloc 0 to save teleport location!");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!");GetPlayerPos(playerid,X,Y,Z),tp1 = CreateDynamicCP(X,Y,Z-0.90, 1, -1, -1, -1, 1, -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 created successfully! Now, use command /gtloc 1 to save teleport location!"),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!");GetPlayerPos(playerid,X,Y,Z),tp2 = CreateDynamicCP(X,Y,Z-0.90, 1, -1, -1, -1, 1, -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 created successfully! Now, use command /gtloc 2 to save teleport location!"),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!");GetPlayerPos(playerid,X, Y, Z),tp3 = CreateDynamicCP(X, Y, Z-0.90, 1, -1, -1, -1, 1, -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 created successfully! Now, use command /gtloc 3 to save teleport location!"),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!");GetPlayerPos(playerid,X,Y,Z),tp4 = CreateDynamicCP(X,Y,Z-0.90, 1, -1, -1, -1, 1, -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 created successfully! Now, use command /gtloc 4 to save teleport location!"),teleport4 = 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");
- }
- }
- return 1;
- }
- if(dialogid == VEHICLES)
- {
- if(response)
- {
- new CarSpawned[MAX_PLAYERS],currentveh;new vid = GetVehicleModel(GetPlayerVehicleID(playerid));GetPlayerPos(playerid, X, Y, Z),GetPlayerFacingAngle(playerid, A),currentveh = GetPlayerVehicleID(playerid),DestroyVehicle(currentveh),CarSpawned[playerid] = AddStaticVehicleEx(vid, X, Y, Z, A, strval(inputtext),strval(inputtext), 0),SetVehicleZAngle(currentveh, A),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)
- {
- new string[128];if(Makingzone == 0) return SendClientMessage(playerid,0xFF0000FF,"ERROR: Create one first and try again!");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 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 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 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 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 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 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 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 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 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;
- }
- public Createzone(playerid,color)
- {
- GangZoneHideForAll(GangZone),GangZoneDestroy(GangZone),GetPlayerPos(playerid,ZMaxX,ZMaxY,Z),GangZone = GangZoneCreate(ZMinX,ZMinY,ZMaxX,ZMaxY),GangZoneShowForAll(GangZone,color);
- return 1;
- }
- 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 == lootarea){isinlootarea = false;}
- ////////////////////////////////////////////////////////////////////////////
- if(areaid == capturearea){isincapturearea = false;}
- ////////////////////////////////////////////////////////////////////////////
- if(areaid == ghousearea){isinghousearea = false,KillTimer(ghouset),KillTimer(ghousetx);}
- ////////////////////////////////////////////////////////////////////////////
- if(areaid == eghousearea){isineghousearea = false;}
- ////////////////////////////////////////////////////////////////////////////
- }
- public OnPlayerLeaveDynamicArea(playerid, areaid)
- {
- ////////////////////////////////////////////////////////////////////////////
- if(areaid == lootarea){isinlootarea = true;}
- ////////////////////////////////////////////////////////////////////////////
- if(areaid == capturearea){isincapturearea = true;}
- ////////////////////////////////////////////////////////////////////////////
- if(areaid == ghousearea){isinghousearea = true;}
- ////////////////////////////////////////////////////////////////////////////
- if(areaid == eghousearea){isineghousearea = true;}
- ////////////////////////////////////////////////////////////////////////////
- }
- 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;
- }
- public planted(playerid)
- {
- if(Eplant == 1){}GetPlayerPos(playerid, posX14[playerid], posY14[playerid], posZ14[playerid]),GameTextForPlayer(playerid, "~g~~h~planted!", 2500, 3),bomb = CreateDynamicPickup(1654, 1, posX14[playerid], posY14[playerid], posZ14[playerid], -1),KillTimer(ghouset),ebomb = SetTimer("explode",3000,false),Eplant = 1;
- }
- public explode(playerid)
- {
- new string[ 64 ];DestroyDynamicPickup(bomb),CreateExplosion(posX14[playerid], posY14[playerid], posZ14[playerid], 6, 5.0),KillTimer(ebomb),Plant = 1,DestroyDynamicObject(gate),UpdateDynamic3DTextLabelText(ganggate, -1, "If you are in this gang use {FFFF00}/opengate(/og) {FFFFFF}to open gate \nand {FFFF00}/closegate(/cg) {FFFFFF}to close gate! \n{FF0000}/Repairgate"),format( string, sizeof(string), "~r~Your gang gate was destroyed!"),GameTextForPlayer(playerid,string, 5000, 3);
- }
- public defuse(playerid)
- {
- new string[128];Plant = 0,KillTimer(ghousetx),UpdateDynamic3DTextLabelText(ganggate, -1, "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"),format( string, sizeof(string), "~g~~h~repaired!"),GameTextForPlayer(playerid,string, 5000, 3);
- gate = CreateDynamicObject(980, 1447.3624, 663.1961, 12.4153, 0.00, 0.00, 180.00);
- ////////////////////////^^Replace with the new gate^^///////////////////////
- }
- ////////////////////////////////////////////////////////////////////////////////
- public OnPlayerUpdate(playerid)
- {
- if(noclipdata[playerid][cameramode] == CAMERA_MODE_FLY)
- {
- new keys,ud,lr;
- GetPlayerKeys(playerid,keys,ud,lr);
- if(noclipdata[playerid][mode] && (GetTickCount() - noclipdata[playerid][lastmove] > 100))
- {MoveCamera(playerid);}
- if(noclipdata[playerid][udold] != ud || noclipdata[playerid][lrold] != lr)
- {
- if((noclipdata[playerid][udold] != 0 || noclipdata[playerid][lrold] != 0) && ud == 0 && lr == 0){StopPlayerObject(playerid, noclipdata[playerid][flyobject]);noclipdata[playerid][mode] = 0;noclipdata[playerid][accelmul] = 0.0;
- }
- else{noclipdata[playerid][mode] = GetMoveDirectionFromKeys(ud, lr);MoveCamera(playerid);
- }
- }
- noclipdata[playerid][udold] = ud; noclipdata[playerid][lrold] = lr;
- return 0;
- }
- return 1;
- }
- ////////////////////////////////////////////////////////////////////////////////
- public heal(playerid){heal_timer[playerid] = 0,KillTimer(heal_timer[playerid]);return 1;}
- public armour(playerid){armour_timer[playerid] = 0,KillTimer(armour_timer[playerid]);return 1;}
- public minigun(playerid){minigun_timer[playerid] = 0,KillTimer(minigun_timer[playerid]);return 1;}
- public rocket(playerid){rocket_timer[playerid] = 0,KillTimer(rocket_timer[playerid]);return 1;}
- public Unfreeze(playerid){TogglePlayerControllable(playerid, true);return 1;}
- stock MoveCamera(playerid)
- {
- new Float:speed = MOVE_SPEED * noclipdata[playerid][accelmul], Float:x, Float:y, Float:z, Float:FV[3], Float:CP[3];GetPlayerCameraPos(playerid, CP[0], CP[1], CP[2]);GetPlayerCameraFrontVector(playerid, FV[0], FV[1], FV[2]);if(noclipdata[playerid][accelmul] <= 1) noclipdata[playerid][accelmul] += ACCEL_RATE;GetNextCameraPosition(noclipdata[playerid][mode], CP, FV, x, y, z);MovePlayerObject(playerid, noclipdata[playerid][flyobject], x, y, z, speed);noclipdata[playerid][lastmove] = GetTickCount();return 1;
- }
- stock FlyMode(playerid)
- {
- new Float:x, Float:y, Float:z;IsCreating[playerid] = true;SettingFirstLoc[playerid] = true;GetPlayerPos(playerid, x, y, z);noclipdata[playerid][flyobject] = CreatePlayerObject(playerid, 19300, x, y, z, 0.0, 0.0, 0.0);TogglePlayerSpectating(playerid, true);AttachCameraToPlayerObject(playerid, noclipdata[playerid][flyobject]);SetPVarInt(playerid, "FlyMode", 1);noclipdata[playerid][cameramode] = CAMERA_MODE_FLY;
- GameTextForPlayer(playerid, "~r~Gang Editor Camera: ~g~~n~Enable ~n~~y~type ~b~/gec ~y~to disable the camera", 5000, 3);return 1;
- }
- stock CancelFlyMode(playerid)
- {
- DeletePVar(playerid, "FlyMode");CancelEdit(playerid);TogglePlayerSpectating(playerid, false);DestroyPlayerObject(playerid, noclipdata[playerid][flyobject]);noclipdata[playerid][cameramode] = CAMERA_MODE_NONE;IsReSettingStart[playerid] = false;IsReSettingEnd[playerid] = false;SettingFirstLoc[playerid] = false;SettingLastLoc[playerid] = false;GameTextForPlayer(playerid, "~r~Gang Editor Camera: ~r~~n~Disable", 5000, 3);
- return 1;
- }
- IsPlayerInArea(playerid, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY)
- {
- new Float:x, Float:y, Float:z;GetPlayerPos(playerid, x, y, z);if(x >= MinX && x <= MaxX && y >= MinY && y <= MaxY) {
- return 1;}return 0;
- }
- stock DestroyNearbyVehicles(playerid, Float:radi)
- {
- new Float:posx, Float:posy, Float:posz, Float:tempposx, Float:tempposy, Float:tempposz;for(new i=1; i<MAX_VEHICLES; i++){if(GetVehicleModel(i)){GetPlayerPos(playerid, X, Y, Z),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);}}}
- }
- stock RespawnNearbyVehicles(playerid, Float:radi)
- {
- new Float:posx, Float:posy, Float:posz, Float:tempposx, Float:tempposy, Float:tempposz;for(new i=1; i<MAX_VEHICLES; i++){if(GetVehicleModel(i)){GetPlayerPos(playerid, X, Y, Z),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))){SetVehicleToRespawn(i);}}}
- }
- stock GetMoveDirectionFromKeys(ud, lr)
- {
- new direction = 0;
- if(lr < 0)
- {
- if(ud < 0) direction = MOVE_FORWARD_LEFT;
- else if(ud > 0) direction = MOVE_BACK_LEFT;
- else direction = MOVE_LEFT;
- }
- else if(lr > 0)
- {
- if(ud < 0) direction = MOVE_FORWARD_RIGHT;
- else if(ud > 0) direction = MOVE_BACK_RIGHT;
- else direction = MOVE_RIGHT;
- }
- else if(ud < 0) direction = MOVE_FORWARD;
- else if(ud > 0) direction = MOVE_BACK;
- return direction;
- }
- stock GetNextCameraPosition(move_mode, Float:CP[3], Float:FV[3], &Float:x, &Float:y, &Float:z)
- {
- #define OFFSET_x (FV[0]*6000.0)
- #define OFFSET_y (FV[1]*6000.0)
- #define OFFSET_z (FV[2]*6000.0)
- switch(move_mode)
- {
- case MOVE_FORWARD:
- {x = CP[0]+OFFSET_x;y = CP[1]+OFFSET_y;z = CP[2]+OFFSET_z;}
- case MOVE_BACK:
- {x = CP[0]-OFFSET_x;y = CP[1]-OFFSET_y;z = CP[2]-OFFSET_z;}
- case MOVE_LEFT:
- {x = CP[0]-OFFSET_y;y = CP[1]+OFFSET_x;z = CP[2];}
- case MOVE_RIGHT:
- {x = CP[0]+OFFSET_y;y = CP[1]-OFFSET_x;z = CP[2];}
- case MOVE_BACK_LEFT:
- {x = CP[0]+(-OFFSET_x - OFFSET_y);y = CP[1]+(-OFFSET_y + OFFSET_x);z = CP[2]-OFFSET_z;}
- case MOVE_BACK_RIGHT:
- {x = CP[0]+(-OFFSET_x + OFFSET_y);y = CP[1]+(-OFFSET_y - OFFSET_x);z = CP[2]-OFFSET_z;}
- case MOVE_FORWARD_LEFT:
- {x = CP[0]+(OFFSET_x - OFFSET_y);y = CP[1]+(OFFSET_y + OFFSET_x);z = CP[2]+OFFSET_z;}
- case MOVE_FORWARD_RIGHT:
- {x = CP[0]+(OFFSET_x + OFFSET_y);y = CP[1]+(OFFSET_y - OFFSET_x);z = CP[2]+OFFSET_z;}
- }
- }
Add Comment
Please, Sign In to add comment