Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <streamer>
- #include <sscanf2>
- #include <zcmd>
- #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 29990
- #define GANGBASE 19991
- #define TELEPORTS 19992
- #define VEHICLES 19993
- #define TERRITORY 19994
- #define GCMDS 19995
- #define SETTINGS 19996
- #define CLASS 19997
- #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)
- ////////////////////////////////////////////////////////////////////////////////
- #define GANG_GATE1Objectid ObjectID
- #define GANG_GATE1Position X, Y, Z
- #define GANG_GATE1Rotation Rx, Ry, Rz
- #define GANG_GATE2Objectid ObjectID
- #define GANG_GATE2Position X, Y, Z
- #define GANG_GATE2Rotation Rx, Ry, Rz
- ////////////////////////////////////////////////////////////////////////////////
- //----------------------------------------------------------------------------//
- //----------------------------------------------------------------------------//`
- 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;const Float:fScale = 5.0;
- new Float:X,Float:Y,Float:Z,Float:A,Float:posX11,Float:posY11,Float:posZ11,Float:posA11,Base,Float:posX12,Float:posY12,Float:posZ12,Float:posA12,Enter,Float:posX13,Float:posY13,Float:posZ13,Float:posA13,Exit,Float:posX14,Float:posY14,Float:posZ14;
- new Float:posX0,Float:posY0,Float:posZ0,Float:posA0,Teleport0;new Float:posX1,Float:posY1,Float:posZ1,Float:posA1,Teleport1;new Float:posX2,Float:posY2,Float:posZ2,Float:posA2,Teleport2;new Float:posX3,Float:posY3,Float:posZ3,Float:posA3,Teleport3;new Float:posX4,Float:posY4,Float:posZ4,Float:posA4,Teleport4;new Text3D:tehouse,Text3D:thouse,Text3D:textloot,Text3D:capturet,Text3D:ganggate,Text3D:ganggate2;
- new hp,ar,mg,rk,gate,gate2,ghouse,loot,capture,captureicon,capturecp,capturetimer,ghouset,ghousetx,bomb,ebomb,Plant,Eplant;new lootarea, bool:isinlootarea,capturearea, bool:isincapturearea,ghousearea, bool:isinghousearea,eghousearea, bool:isineghousearea;
- 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 heal_timer[MAX_PLAYERS],armour_timer[MAX_PLAYERS],minigun_timer[MAX_PLAYERS],rocket_timer[MAX_PLAYERS];new Float:ZMinX,Float:ZMinY,Float:ZMaxX,Float:ZMaxY,Makingzone,GangZone,Create,Tprotection;
- new tp0,tp1,tp2,tp3,tp4;new Text3D:ltp0,Text3D:ltp1,Text3D:ltp2,Text3D:ltp3,Text3D:ltp4;new teleport0,teleport1,teleport2,teleport3,teleport4;new Float:posX,Float:posY,Float:posZ,Float:posA;
- enum noclipenum{cameramode,flyobject,mode,lrold,udold,lastmove,Float:accelmul}
- new coordInfo[MAX_PLAYERS][Coordinates],noclipdata[MAX_PLAYERS][noclipenum];
- //----------------------------------------------------------------------------//
- //----------------------------------------------------------------------------//
- public OnFilterScriptInit()
- {
- return 1;
- }
- 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(GetPlayerTeam(playerid) == 1) SetPlayerPos(playerid, posX, posY, posZ+0.10),SetPlayerFacingAngle(playerid, posA),SetCameraBehindPlayer(playerid),ResetPlayerWeapons(playerid),SetPlayerInterior(playerid, 1),TogglePlayerControllable(playerid, false),SetTimerEx("Unfreeze", 1000, false, "i", playerid),
- GivePlayerWeapon(playerid,34,6000),GivePlayerWeapon(playerid,32,6000),GivePlayerWeapon(playerid,31,6000),GivePlayerWeapon(playerid,24,6000),GivePlayerWeapon(playerid,26,6000),GivePlayerWeapon(playerid,9,1);
- return 1;
- }
- ////////////////////////////////////////////////////////////////////////////////
- CMD:baseinfo(playerid, params[])
- {
- //SendClientMessage(playerid, 0xFF0000FF, "ERROR: No data has been loaded! Try again later!");
- SendClientMessage(playerid, 0xFF0000FF, "+=================================+");
- SendClientMessage(playerid, 0xFF0000FF, " Gang Info: [NAME]");
- SendClientMessage(playerid, 0x00CC3300, "Use {FFFFFF}/class {00CC33}to select your spawn point");
- SendClientMessage(playerid, 0x00CC3300, "Created Objects: {FFFFFF}[COUNT] {00CC33}Removed Objects: {FFFFFF}[COUNT]");
- SendClientMessage(playerid, 0x00CC3300, "Textured Objects: {FFFFFF}[COUNT] {00CC33}Scripted Texts: {FFFFFF}[COUNT]");
- SendClientMessage(playerid, 0x00CC3300, "Download: {FFFFFF}[LINK]");
- SendClientMessage(playerid, 0xFF0000FF, "+=================================+");
- return 1;
- }
- CMD:class(playerid, params[])
- {
- ShowPlayerDialog(playerid, CLASS, DIALOG_STYLE_LIST, "{FF0000}Server Spawn", "{00FF00}Global Spawn\n{FF0000}Gang Spawn #1", "Select", "Close");
- return 1;
- }
- CMD:gec(playerid, params[])
- {
- 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;
- }
- CMD:editgang(playerid,params[])
- {
- 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");
- }
- return 1;
- }
- CMD:base(playerid, params[])
- {
- ShowPlayerDialog(playerid, GANGBASE ,DIALOG_STYLE_LIST,"Base Teleports","{FFFF00}Gang Tester V3.2","Teleport","Close");
- return 1;
- }
- CMD:loot(playerid, params[])
- {
- 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;
- }
- CMD:enter(playerid, params[])
- {
- 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;
- }
- CMD:exit(playerid, params[])
- {
- 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;
- }
- ////////////////////////////////////////////////////////////////////////////////
- CMD:gtloc(playerid, params[])
- {
- new option[5];
- if(IsPlayerAdmin(playerid))
- if(sscanf(params, "s[5]", option)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /gtloc [Teleport ID]");
- if(!strcmp(option, "1", true))
- {
- if(Teleport0 > 0)return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can use this command only once! Reset or Remove Teleports and try again!");GetPlayerPos(playerid, posX0, posY0, posZ0),GetPlayerFacingAngle(playerid, posA0),Teleport0 = 1,SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport position set");
- return 1;
- }
- if(!strcmp(option, "2", true))
- {
- if(Teleport1 > 0)return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can use this command only once! Reset or Remove Teleports and try again!");GetPlayerPos(playerid, posX1, posY1, posZ1),GetPlayerFacingAngle(playerid, posA1),Teleport1 = 1,SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport position set");
- return 1;
- }
- if(!strcmp(option, "3", true))
- {
- if(Teleport2 > 0)return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can use this command only once! Reset or Remove Teleports and try again!");GetPlayerPos(playerid, posX2, posY2, posZ2),GetPlayerFacingAngle(playerid, posA2),Teleport2 = 1,SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport position set");
- return 1;
- }
- if(!strcmp(option, "4", true))
- {
- if(Teleport3 > 0)return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can use this command only once! Reset or Remove Teleports and try again!");GetPlayerPos(playerid, posX3, posY3, posZ3),GetPlayerFacingAngle(playerid, posA3),Teleport3 = 1,SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport position set");
- return 1;
- }
- if(!strcmp(option, "5", true))
- {
- if(Teleport4 > 0)return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can use this command only once! Reset or Remove Teleports and try again!");GetPlayerPos(playerid, posX4, posY4, posZ4),GetPlayerFacingAngle(playerid, posA4),Teleport4 = 1,SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Teleport position set");
- return 1;
- }
- return 1;
- }
- CMD:capture(playerid, params[])
- {
- 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;
- }
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- CMD:blowgate(playerid, params[])
- {
- if(IsPlayerInRangeOfPoint(playerid, 15, GANG_GATE1Position))
- {
- SetPlayerChatBubble(playerid, "Planting", 0xFF0000FF, 100.0, 10000);
- GameTextForPlayer(playerid, "~g~~h~Planting", 5000, 3),ghouset = SetTimer("planted",10000,false);
- }
- else{SendClientMessage(playerid, 0xFF0000FF, "ERROR: You are not near any gate!");}
- return 1;
- }
- CMD:repairgate(playerid, params[])
- {
- if(IsPlayerInRangeOfPoint(playerid, 15, GANG_GATE1Position))
- {
- 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;
- }
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- CMD:og(playerid, params[])
- {
- if(IsPlayerInRangeOfPoint(playerid, 15.0, GANG_GATE1Position))
- {
- if(Plant == 1) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can't use the gate when is destroyed! Use /repairgate to fix it!");
- MoveDynamicObject(gate, GANG_GATE1Position-7, 3, GANG_GATE1Rotation);
- }
- else if(IsPlayerInRangeOfPoint(playerid, 15.0, GANG_GATE2Position))
- {
- MoveDynamicObject(gate2, GANG_GATE2Position-7, 3, GANG_GATE2Rotation);
- }
- return 1;
- }
- CMD:cg(playerid, params[])
- {
- if(IsPlayerInRangeOfPoint(playerid, 15.0, GANG_GATE1Position))
- {
- if(Plant == 1) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can't use the gate when is destroyed! Use /repairgate to fix it!");
- MoveDynamicObject(gate, GANG_GATE1Position, 3, GANG_GATE1Rotation);
- }
- else if(IsPlayerInRangeOfPoint(playerid, 15.0, GANG_GATE2Position))
- {
- MoveDynamicObject(gate2, GANG_GATE2Position, 3, GANG_GATE2Rotation);
- }
- return 1;
- }
- CMD:opengate(playerid, params[])
- {
- if(IsPlayerInRangeOfPoint(playerid, 15.0, GANG_GATE1Position))
- {
- if(Plant == 1) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can't use the gate when is destroyed! Use /repairgate to fix it!");
- MoveDynamicObject(gate, GANG_GATE1Position-7, 3, GANG_GATE1Rotation);
- }
- else if(IsPlayerInRangeOfPoint(playerid, 15.0, GANG_GATE2Position))
- {
- MoveDynamicObject(gate2, GANG_GATE2Position-7, 3, GANG_GATE2Rotation);
- }
- return 1;
- }
- CMD:closegate(playerid, params[])
- {
- if(IsPlayerInRangeOfPoint(playerid, 15.0, GANG_GATE1Position))
- {
- if(Plant == 1) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You can't use the gate when is destroyed! Use /repairgate to fix it!");
- MoveDynamicObject(gate, GANG_GATE1Position, 3, GANG_GATE1Rotation);
- }
- else if(IsPlayerInRangeOfPoint(playerid, 15.0, GANG_GATE2Position))
- {
- MoveDynamicObject(gate2, GANG_GATE2Position, 3, GANG_GATE2Rotation);
- }
- return 1;
- }
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////
- 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 == tp0){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 OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
- {
- if(GetPlayerTeam(playerid) == 1)GameTextForPlayer(playerid, "~R~warning~n~~w~stop shooting ~n~your teammate", 3000, 3);
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == SPAWN)// Save Spawn //
- {
- if(response)
- {
- if(listitem == 0)
- {
- new int;
- GetPlayerPos(playerid, posX, posY, posZ),GetPlayerFacingAngle(playerid, posA),int = GetPlayerInterior(playerid),SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Spawn saved!");for( new i; i < MAX_PLAYERS; i++ ){SetPlayerTeam(i, 1);SetPlayerInterior(playerid, int);}
- }
- if(listitem == 1)
- {
- SendClientMessage(playerid, 0x00CC3300, "SUCCESS: Spawn reset!"),SetPlayerTeam(playerid, 0);
- }
- }
- return 1;
- }
- if(dialogid == CAPTURE)// Set Capture //
- {
- if(response)
- {
- if(listitem == 0){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 == 1){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, 0, -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,0, -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,GANG_GATE1Position);}
- if(listitem == 1)
- {
- //SendClientMessage(playerid, 0xFF0000FF, "ERROR: There is no gate loaded!");
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- DestroyDynamicObject(gate),DestroyDynamic3DTextLabel(ganggate),DestroyDynamicObject(gate2),DestroyDynamic3DTextLabel(ganggate2),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, GANG_GATE1Position, 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1);
- gate = CreateDynamicObject(GANG_GATE1Objectid, GANG_GATE1Position, GANG_GATE1Rotation);
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- //ganggate2 = CreateDynamic3DTextLabel("If you are in this gang use {FFFF00}/opengate(/og) {FFFFFF}to open gate \nand {FFFF00}/closegate(/cg) {FFFFFF}to close gate!", -1, GANG_GATE2Position, 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1);
- //gate2 = CreateDynamicObject(GANG_GATE2Objectid, GANG_GATE2Position, GANG_GATE2Rotation);
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- }
- if(listitem == 2){DestroyDynamicObject(gate),DestroyDynamic3DTextLabel(ganggate),SendClientMessage(playerid, 0x00CC3300, "SUCCES: Gate destroyed!");}
- }
- return 1;
- }
- if(dialogid == CLASS)
- {
- if(response)
- {
- if(listitem == 0){SetPlayerTeam(playerid, 0);SpawnPlayer(playerid);}
- if(listitem == 1){SetPlayerTeam(playerid, 1);SpawnPlayer(playerid);}}
- 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 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(tp0),DestroyDynamicCP(tp1),DestroyDynamicCP(tp2),DestroyDynamicCP(tp3),DestroyDynamicCP(tp4);
- DestroyDynamic3DTextLabel(ltp0),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_INPUT,"{FF0000}Set Teleport","{FF0000}Insert teleport name","Create","Cancel");//test version
- 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_INPUT,"{FF0000}Set Territory List","{FF0000}Insert values","Select","Cancel");//test version
- 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");
- }
- }
- 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 == TELEPORTS)// Teleports List //
- {
- if(response)
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid, 1010 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
- }
- else if(listitem == 1)
- {
- ShowPlayerDialog(playerid, 1011 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
- }
- else if(listitem == 2)
- {
- ShowPlayerDialog(playerid, 1012 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
- }
- else if(listitem == 3)
- {
- ShowPlayerDialog(playerid, 1013 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
- }
- else if(listitem == 4)
- {
- ShowPlayerDialog(playerid, 1014 ,DIALOG_STYLE_INPUT,"{FF0000}Teleport Name","Insert an teleport name bellow","Create","Close");
- }
- }
- 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);tp0 = CreateDynamicCP(X, Y, Z-0.90, 1, -1, -1, -1, 1, -1, 0);ltp0 = CreateDynamic3DTextLabel("", -1, X,Y,Z, 25.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, -1, -1, -1);UpdateDynamic3DTextLabelText(ltp0, -1, inputtext);SendClientMessage(playerid,0x00CC3300, "SUCCESS: Teleport created successfully! Now, use command /gtloc 1 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 2 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 3 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 4 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 5 to save teleport location!"),teleport4 = 1;
- }
- 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), -1),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;
- }
- forward Createzone(playerid,color);
- 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)
- {
- new string[128];if(Eplant == 1){}GetObjectPos(gate, posX14, posY14, posZ14),GameTextForPlayer(playerid, "~g~~h~planted!", 2500, 3),bomb = CreatePickup(1654, 1, posX14, posY14, posZ14, -1),KillTimer(ghouset),ebomb = SetTimer("explode",3000,false),Eplant = 1,GameTextForPlayer(playerid,string, 5000, 3);
- }
- public explode(playerid)
- {
- new string[ 64 ];if(GetPlayerTeam(playerid) == 1)format( string, sizeof(string), "~r~Your gang gate was destroyed!");
- DestroyPickup(bomb),CreateExplosion(posX14, posY14, posZ14, 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");
- }
- 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(GANG_GATE1Objectid,GANG_GATE1Position,GANG_GATE1Rotation);
- ////////////////////////^^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;
- }
- ////////////////////////////////////////////////////////////////////////////////
- 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);
- 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;
- }
- 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;}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement