Advertisement
sasaa86

Dayz Init.c (old)

Oct 12th, 2018
510
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 32.84 KB | None | 0 0
  1.   void main()
  2. {
  3.     Hive ce = CreateHive();
  4.     if ( ce )
  5.         ce.InitOffline();
  6.  
  7.     Weather weather = g_Game.GetWeather();
  8.  
  9.     weather.GetOvercast().SetLimits( 0.0 , 1.0 );
  10.     weather.GetRain().SetLimits( 0.0 , 0.0 );
  11.     weather.GetFog().SetLimits( 0.0 , 0.25 );
  12.  
  13.     weather.GetOvercast().SetForecastChangeLimits( 0.0, 0.2 );
  14.     weather.GetRain().SetForecastChangeLimits( 0.0, 0.0 );
  15.     weather.GetFog().SetForecastChangeLimits( 0.15, 0.45 );
  16.  
  17.     weather.GetOvercast().SetForecastTimeLimits( 1800 , 1800 );
  18.     weather.GetRain().SetForecastTimeLimits( 600 , 600 );
  19.     weather.GetFog().SetForecastTimeLimits( 1800 , 1800 );
  20.  
  21.     weather.GetOvercast().Set( Math.RandomFloatInclusive(0.0, 0.3), 0, 0);
  22.     weather.GetRain().Set( Math.RandomFloatInclusive(0.0, 0.2), 0, 0);
  23.     weather.GetFog().Set( Math.RandomFloatInclusive(0.0, 0.1), 0, 0);
  24.    
  25.     weather.SetWindMaximumSpeed(15);
  26.     weather.SetWindFunctionParams(0.1, 0.3, 50);
  27.    
  28.    
  29.     // ############################## Bridge ##################################
  30.     Object obj;
  31.     obj = GetGame().CreateObject("Dam_Concrete_20_Floodgate", "12999.700195 -7.890600 3284.985596");
  32.     obj.SetOrientation("55.999985 0.000000 0.000000");
  33.     obj.SetPosition("12999.700195 -7.890600 3284.985596");
  34.     obj = GetGame().CreateObject("Dam_Concrete_20_Floodgate", "12988.517578 -7.890600 3301.570557");
  35.     obj.SetOrientation("55.999985 0.000000 0.000000");
  36.     obj.SetPosition("12988.517578 -7.890600 3301.570557");
  37.     obj = GetGame().CreateObject("Dam_Concrete_20_Floodgate", "12977.330078 -7.890600 3318.156250");
  38.     obj.SetOrientation("56.000000 0.000000 0.000000");
  39.     obj.SetPosition("12977.330078 -7.890600 3318.156250");
  40.     obj = GetGame().CreateObject("Dam_Concrete_20_Floodgate", "12966.149414 -7.890600 3334.729980");
  41.     obj.SetOrientation("56.000000 0.000000 0.000000");
  42.     obj.SetPosition("12966.149414 -7.890600 3334.729980");
  43.     obj = GetGame().CreateObject("Dam_Concrete_20_Floodgate", "12954.969727 -7.890600 3351.300049");
  44.     obj.SetOrientation("56.000000 0.000000 0.000000");
  45.     obj.SetPosition("12954.969727 -7.890600 3351.300049");
  46.     obj = GetGame().CreateObject("Dam_Concrete_20_Floodgate", "12943.798828 -7.890600 3367.870117");
  47.     obj.SetOrientation("56.000000 0.000000 0.000000");
  48.     obj.SetPosition("12943.798828 -7.890600 3367.870117");
  49.     obj = GetGame().CreateObject("Dam_Concrete_20_Floodgate", "12932.620117 -7.890600 3384.443604");
  50.     obj.SetOrientation("56.000000 0.000000 0.000000");
  51.     obj.SetPosition("12932.620117 -7.890600 3384.443604");
  52.     obj = GetGame().CreateObject("Dam_Concrete_20_Floodgate", "12921.450195 -7.890600 3401.000000");
  53.     obj.SetOrientation("56.000000 0.000000 0.000000");
  54.     obj.SetPosition("12921.450195 -7.890600 3401.000000");
  55.     obj = GetGame().CreateObject("Dam_Concrete_20_Floodgate", "12910.259766 -7.890600 3417.581055");
  56.     obj.SetOrientation("56.000000 0.000000 0.000000");
  57.     obj.SetPosition("12910.259766 -7.890600 3417.581055");
  58.     obj = GetGame().CreateObject("Dam_Concrete_20_Floodgate", "12899.080078 -7.890600 3434.149902");
  59.     obj.SetOrientation("56.000000 0.000000 0.000000");
  60.     obj.SetPosition("12899.080078 -7.890600 3434.149902");
  61.     obj = GetGame().CreateObject("Dam_Concrete_20_Floodgate", "12887.900391 -7.890600 3450.728027");
  62.     obj.SetOrientation("56.000000 0.000000 0.000000");
  63.     obj.SetPosition("12887.900391 -7.890600 3450.728027");
  64.     obj = GetGame().CreateObject("Dam_Concrete_20_Floodgate", "12876.709961 -7.890600 3467.312256");
  65.     obj.SetOrientation("56.000000 0.000000 0.000000");
  66.     obj.SetPosition("12876.709961 -7.890600 3467.312256");
  67.     obj = GetGame().CreateObject("Dam_Concrete_20_Floodgate", "12865.540039 -7.890600 3483.872803");
  68.     obj.SetOrientation("56.000000 0.000000 0.000000");
  69.     obj.SetPosition("12865.540039 -7.890600 3483.872803");
  70.     obj = GetGame().CreateObject("Dam_Concrete_20_Floodgate", "12854.360352 -7.890600 3500.449463");
  71.     obj.SetOrientation("56.000000 0.000000 0.000000");
  72.     obj.SetPosition("12854.360352 -7.890600 3500.449463");
  73.     obj = GetGame().CreateObject("Dam_Concrete_20_Floodgate", "12843.179688 -7.890600 3517.039795");
  74.     obj.SetOrientation("56.000000 0.000000 0.000000");
  75.     obj.SetPosition("12843.179688 -7.890600 3517.039795");
  76.     obj = GetGame().CreateObject("Dam_Concrete_20_Floodgate", "12831.998047 -7.890600 3533.620117");
  77.     obj.SetOrientation("56.000000 0.000000 0.000000");
  78.     obj.SetPosition("12831.998047 -7.890600 3533.620117");
  79.     obj = GetGame().CreateObject("Dam_Concrete_20_Floodgate", "12820.809570 -7.890600 3550.198975");
  80.     obj.SetOrientation("56.000000 0.000000 0.000000");
  81.     obj.SetPosition("12820.809570 -7.890600 3550.198975");
  82.     obj = GetGame().CreateObject("Dam_Concrete_20_Floodgate", "12809.627930 -7.890600 3566.780029");
  83.     obj.SetOrientation("56.000000 0.000000 0.000000");
  84.     obj.SetPosition("12809.627930 -7.890600 3566.780029");
  85.     obj = GetGame().CreateObject("Dam_Concrete_20_Floodgate", "12798.440430 -7.890600 3583.360107");
  86.     obj.SetOrientation("56.000000 0.000000 0.000000");
  87.     obj.SetPosition("12798.440430 -7.890600 3583.360107");
  88.     obj = GetGame().CreateObject("Land_Container_1Moh", "12809.701172 2.301730 3576.680176");
  89.     obj.SetOrientation("138.000015 0.000000 0.000000");
  90.     obj.SetPosition("12809.701172 2.301730 3576.680176");
  91.     obj = GetGame().CreateObject("Land_Container_1Moh", "12835.256836 2.086504 3538.797119");
  92.     obj.SetOrientation("-20.000008 0.000000 0.000000");
  93.     obj.SetPosition("12835.256836 2.086504 3538.797119");
  94.     obj = GetGame().CreateObject("Land_Container_1Moh", "12894.056641 2.251730 3455.602783");
  95.     obj.SetOrientation("-69.000000 0.000000 0.000000");
  96.     obj.SetPosition("12894.056641 2.251730 3455.602783");
  97.     obj = GetGame().CreateObject("Land_Container_1Moh", "12934.767578 2.301730 3387.844238");
  98.     obj.SetOrientation("0.000000 0.000000 0.000000");
  99.     obj.SetPosition("12934.767578 2.301730 3387.844238");
  100.     obj = GetGame().CreateObject("Land_Container_1Moh", "12990.190430 2.251730 3310.003662");
  101.     obj.SetOrientation("-62.000011 0.000000 0.000000");
  102.     obj.SetPosition("12990.190430 2.251730 3310.003662");
  103.     obj = GetGame().CreateObject("Land_Container_1Bo", "12999.427734 2.249999 3290.898682");
  104.     obj.SetOrientation("-17.000000 0.000000 0.000000");
  105.     obj.SetPosition("12999.427734 2.249999 3290.898682");
  106.     obj = GetGame().CreateObject("Land_Container_1Bo", "12966.283203 2.201730 3346.047607");
  107.     obj.SetOrientation("-33.000004 0.000000 0.000000");
  108.     obj.SetPosition("12966.283203 2.201730 3346.047607");
  109.     obj = GetGame().CreateObject("Land_Container_1Bo", "12947.516602 1.970427 3371.596680");
  110.     obj.SetOrientation("-30.000006 0.000000 0.000000");
  111.     obj.SetPosition("12947.516602 1.970427 3371.596680");
  112.     obj = GetGame().CreateObject("Land_Container_1Bo", "12912.168945 2.301730 3425.531006");
  113.     obj.SetOrientation("-57.999996 0.000000 0.000000");
  114.     obj.SetPosition("12912.168945 2.301730 3425.531006");
  115.     obj = GetGame().CreateObject("Land_Container_1Mo", "12900.983398 2.060063 3443.850830");
  116.     obj.SetOrientation("-4.000000 0.000000 0.000000");
  117.     obj.SetPosition("12900.983398 2.060063 3443.850830");
  118.     obj = GetGame().CreateObject("Land_Container_1Mo", "12912.173828 4.767287 3425.496338");
  119.     obj.SetOrientation("-57.999992 0.000000 0.000000");
  120.     obj.SetPosition("12912.173828 4.767287 3425.496338");
  121.     obj = GetGame().CreateObject("Land_Ship_Big_FrontA", "12984.049805 2.145268 3357.270996");
  122.     obj.SetOrientation("1.000000 -3.000000 -22.000023");
  123.     obj.SetPosition("12984.049805 2.145268 3357.270996");
  124.     obj = GetGame().CreateObject("Land_Ship_Big_FrontA", "12827.272461 4.828312 3481.351318");
  125.     obj.SetOrientation("-168.000015 -0.000000 -21.000008");
  126.     obj.SetPosition("12827.272461 4.828312 3481.351318");
  127.     obj = GetGame().CreateObject("Land_Ship_Big_BackA", "12917.408203 8.878326 3483.023193");
  128.     obj.SetOrientation("0.000000 0.000000 20.000000");
  129.     obj.SetPosition("12917.408203 8.878326 3483.023193");
  130.     obj = GetGame().CreateObject("Land_Boat_Small3", "12833.511719 2.117162 3619.730957");
  131.     obj.SetOrientation("0.000000 0.000000 0.000000");
  132.     obj.SetPosition("12833.511719 2.117162 3619.730957");
  133.     obj = GetGame().CreateObject("Land_Boat_Small2", "12813.396484 2.016087 3605.192139");
  134.     obj.SetOrientation("0.000000 0.000000 0.000000");
  135.     obj.SetPosition("12813.396484 2.016087 3605.192139");
  136.     obj = GetGame().CreateObject("Land_Boat_Small2", "12768.120117 2.487283 3579.249756");
  137.     obj.SetOrientation("0.000000 0.000000 0.000000");
  138.     obj.SetPosition("12768.120117 2.487283 3579.249756");
  139.     obj = GetGame().CreateObject("Land_Boat_Small2", "12735.276367 2.460250 3556.484863");
  140.     obj.SetOrientation("0.000000 0.000000 0.000000");
  141.     obj.SetPosition("12735.276367 2.460250 3556.484863");
  142.     obj = GetGame().CreateObject("Land_Boat_Small1", "12776.724609 4.262555 3591.847168");
  143.     obj.SetOrientation("0.000000 0.000000 0.000000");
  144.     obj.SetPosition("12776.724609 4.262555 3591.847168");
  145.     obj = GetGame().CreateObject("Land_Boat_Small1", "12829.964844 1.846758 3614.488770");
  146.     obj.SetOrientation("0.000000 0.000000 0.000000");
  147.     obj.SetPosition("12829.964844 1.846758 3614.488770");
  148.     obj = GetGame().CreateObject("Land_Wreck_Uaz", "12832.424805 1.935676 3544.248535");
  149.     obj.SetOrientation("0.000000 0.000000 0.000000");
  150.     obj.SetPosition("12832.424805 1.935676 3544.248535");
  151.     obj = GetGame().CreateObject("Land_Wreck_Uaz", "12889.860352 1.985680 3460.103760");
  152.     obj.SetOrientation("-70.000000 0.000000 0.000000");
  153.     obj.SetPosition("12889.860352 1.985680 3460.103760");
  154.     obj = GetGame().CreateObject("Land_Wreck_Uaz", "12937.300781 1.935676 3383.198975");
  155.     obj.SetOrientation("0.000000 0.000000 0.000000");
  156.     obj.SetPosition("12937.300781 1.935676 3383.198975");
  157.     obj = GetGame().CreateObject("Land_Wreck_S1023_Blue", "12931.631836 2.091624 3390.962158");
  158.     obj.SetOrientation("-25.000008 0.000000 0.000000");
  159.     obj.SetPosition("12931.631836 2.091624 3390.962158");
  160.     obj = GetGame().CreateObject("Land_Wreck_Volha_Blue", "12986.588867 1.829433 3314.493896");
  161.     obj.SetOrientation("0.000000 0.000000 0.000000");
  162.     obj.SetPosition("12986.588867 1.829433 3314.493896");
  163.     obj = GetGame().CreateObject("Land_Wreck_Volha_Blue", "13003.046875 1.829433 3284.915771");
  164.     obj.SetOrientation("-17.000004 0.000000 0.000000");
  165.     obj.SetPosition("13003.046875 1.829433 3284.915771");
  166.     obj = GetGame().CreateObject("Land_Wreck_V3S", "12903.459961 2.536791 3436.341797");
  167.     obj.SetOrientation("-24.000000 -4.000000 -0.000000");
  168.     obj.SetPosition("12903.459961 2.536791 3436.341797");
  169.     obj = GetGame().CreateObject("Land_Wreck_Lada_Red", "12871.142578 1.753987 3480.337891");
  170.     obj.SetOrientation("0.000000 0.000000 0.000000");
  171.     obj.SetPosition("12871.142578 1.753987 3480.337891");
  172.     obj = GetGame().CreateObject("Land_Wreck_Lada_Red", "12849.930664 1.753987 3521.847412");
  173.     obj.SetOrientation("-65.999985 0.000000 0.000000");
  174.     obj.SetPosition("12849.930664 1.753987 3521.847412");
  175.     obj = GetGame().CreateObject("Land_Container_1Aoh", "12860.179688 2.301730 3505.910400");
  176.     obj.SetOrientation("-32.000004 0.000000 0.000000");
  177.     obj.SetPosition("12860.179688 2.301730 3505.910400");
  178.     obj = GetGame().CreateObject("Land_Container_1Moh", "12884.648438 2.301730 3470.343018");
  179.     obj.SetOrientation("0.000000 0.000000 0.000000");
  180.     obj.SetPosition("12884.648438 2.301730 3470.343018");
  181.     obj = GetGame().CreateObject("Land_Container_1Bo", "12820.764648 2.301730 3562.224609");
  182.     obj.SetOrientation("0.000000 0.000000 0.000000");
  183.     obj.SetPosition("12820.764648 2.301730 3562.224609");
  184.     obj = GetGame().CreateObject("Land_Container_1Aoh", "12876.986328 0.573664 3519.558594");
  185.     obj.SetOrientation("0.000000 0.000000 0.000000");
  186.     obj.SetPosition("12876.986328 0.573664 3519.558594");
  187.     obj = GetGame().CreateObject("Land_Container_1Aoh", "12851.830078 0.312851 3463.268066");
  188.     obj.SetOrientation("-80.000000 0.000000 0.000000");
  189.     obj.SetPosition("12851.830078 0.312851 3463.268066");
  190.     obj = GetGame().CreateObject("Land_Container_1Aoh", "12936.000977 0.579718 3442.836914");
  191.     obj.SetOrientation("94.000031 0.000000 0.000000");
  192.     obj.SetPosition("12936.000977 0.579718 3442.836914");
  193.     obj = GetGame().CreateObject("Land_Container_1Aoh", "12936.377930 -0.158530 3346.650391");
  194.     obj.SetOrientation("34.000000 0.000000 0.000000");
  195.     obj.SetPosition("12936.377930 -0.158530 3346.650391");
  196.     obj = GetGame().CreateObject("Land_Container_1Aoh", "13002.358398 1.284515 3319.798828");
  197.     obj.SetOrientation("-74.000000 0.000000 0.000000");
  198.     obj.SetPosition("13002.358398 1.284515 3319.798828");
  199.     obj = GetGame().CreateObject("Land_Container_1Bo", "12946.557617 0.260173 3406.045410");
  200.     obj.SetOrientation("-67.000000 0.000000 0.000000");
  201.     obj.SetPosition("12946.557617 0.260173 3406.045410");
  202.     obj = GetGame().CreateObject("Land_Container_1Bo", "12821.682617 0.678651 3528.143799");
  203.     obj.SetOrientation("-64.000000 0.000000 0.000000");
  204.     obj.SetPosition("12821.682617 0.678651 3528.143799");
  205.     obj = GetGame().CreateObject("Land_Container_1Bo", "12851.442383 0.351952 3561.598877");
  206.     obj.SetOrientation("-57.999992 0.000000 0.000000");
  207.     obj.SetPosition("12851.442383 0.351952 3561.598877");
  208.     obj = GetGame().CreateObject("Land_Container_1Bo", "12918.758789 0.920032 3364.437012");
  209.     obj.SetOrientation("-60.999996 0.000000 0.000000");
  210.     obj.SetPosition("12918.758789 0.920032 3364.437012");
  211.     obj = GetGame().CreateObject("Land_Container_1Mo", "12934.750977 0.666381 3418.666992");
  212.     obj.SetOrientation("-52.000000 0.000000 0.000000");
  213.     obj.SetPosition("12934.750977 0.666381 3418.666992");
  214.     obj = GetGame().CreateObject("Land_Container_1Mo", "12856.403320 0.043793 3469.494629");
  215.     obj.SetOrientation("-45.999996 0.000000 0.000000");
  216.     obj.SetPosition("12856.403320 0.043793 3469.494629");
  217.     obj = GetGame().CreateObject("Land_Container_1Mo", "12879.313477 0.908100 3459.768066");
  218.     obj.SetOrientation("-120.999969 -64.000015 -54.999989");
  219.     obj.SetPosition("12879.313477 0.908100 3459.768066");
  220.     obj = GetGame().CreateObject("Land_Lighthouse", "13057.658203 27.043219 3247.424805");
  221.     obj.SetOrientation("0.000000 0.000000 0.000000");
  222.     obj.SetPosition("13057.658203 27.043219 3247.424805"); 
  223.     // ############################## Bridge ##################################
  224. }
  225.  
  226.  
  227.  
  228. class CustomMission: MissionServer
  229. {  
  230.     override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName)
  231.     {
  232.         Entity playerEnt = GetGame().CreatePlayer(identity, characterName, pos, 0, "NONE");
  233.         Class.CastTo(m_player, playerEnt);
  234.         GetGame().SelectPlayer(identity, m_player);
  235.         return m_player;
  236.     }
  237.    
  238.     void SetRandomHealth(EntityAI itemEnt)
  239.     {
  240.         int rndHlt = Math.RandomInt(60,100);
  241.         itemEnt.SetHealth("","",rndHlt);
  242.     }
  243.    
  244.     //! OnInit
  245.     // ###################################
  246.     override void OnInit()
  247.     {
  248.         GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(NumPLayersOnServer, 300000, true);      // 5 minutes
  249.         m_safeZone  = true;         // enable safezone
  250.         n_StaminaStatus = true;     // enable no stamina in safezone
  251.     }
  252.  
  253.    
  254.     /*!  disabled for now
  255.     // safezone
  256.     bool m_StaminaStatus;  
  257.     bool m_SafeZone;
  258.  
  259.     vector SAFEZONE_LOACTION = "3700 0 6060"; //Map coords (position of the safe zone)   Current Coords: [Island]
  260.     float  SAFEZONE_RADIUS   = 500; //In meter
  261.  
  262.     string ENTRY_MESSAGE     = "Welcome to The SafeZone!";
  263.     string EXIT_MESSAGE      = "You Have Left The SafeZone!";
  264.  
  265.     //Runs every tick (Stat time tick!) IMPORANT: Does reduce about 120 FPS when server is High-Full Pop!
  266.     void SafeZoneHandle(PlayerBase player)
  267.     {
  268.         float distance;
  269.         string ZoneCheck, GUID;
  270.         GUID = player.GetIdentity().GetPlainId(); //Steam 64
  271.         Param1<string> Msgparam;
  272.  
  273.         distance = vector.Distance(player.GetPosition(),SAFEZONE_LOACTION);
  274.         if (distance <= SAFEZONE_RADIUS) //Player Inside Zone
  275.         {
  276.             g_Game.GetProfileString("SafeZoneStatus"+ GUID, ZoneCheck);
  277.             if (ZoneCheck == "true") //Already in zone
  278.             {
  279.                 return;
  280.             }
  281.             else
  282.             {
  283.                 g_Game.SetProfileString("SafeZoneStatus"+ GUID, "true");
  284.                 Msgparam = new Param1<string>( ENTRY_MESSAGE );
  285.                 GetGame().RPCSingleParam(player, ERPCs.RPC_USER_ACTION_MESSAGE, Msgparam, true, player.GetIdentity());
  286.             }
  287.         }
  288.         else if (distance > SAFEZONE_RADIUS) //Plauer Outside of Zone
  289.         {
  290.             g_Game.GetProfileString("SafeZoneStatus"+ GUID, ZoneCheck);
  291.             if (ZoneCheck == "false")
  292.             {
  293.                 return;
  294.             }
  295.             else
  296.             {
  297.                 g_Game.SetProfileString("SafeZoneStatus"+ GUID, "false");
  298.                 Msgparam = new Param1<string>( EXIT_MESSAGE );
  299.                 GetGame().RPCSingleParam(player, ERPCs.RPC_USER_ACTION_MESSAGE, Msgparam, true, player.GetIdentity());
  300.             }
  301.         }
  302.     }
  303.  
  304. override void TickScheduler(float timeslice)
  305.     {
  306.         GetGame().GetWorld().GetPlayerList(m_Players);
  307.         if( m_Players.Count() == 0 ) return;
  308.         for(int i = 0; i < SCHEDULER_PLAYERS_PER_TICK; i++)
  309.         {
  310.             if(m_currentPlayer >= m_Players.Count() )
  311.             {
  312.                 m_currentPlayer = 0;
  313.             }
  314.  
  315.             PlayerBase currentPlayer = PlayerBase.Cast(m_Players.Get(m_currentPlayer));
  316.             if (m_StaminaStatus) { currentPlayer.GetStatStamina().Set(1000); }
  317.             if (m_SafeZone) { SafeZoneHandle(currentPlayer); } //Check if player is near safezone
  318.             currentPlayer.OnTick();
  319.             m_currentPlayer++;
  320.         }
  321.     }
  322.     // einde safezone
  323.     */
  324.    
  325.     void NumPLayersOnServer()
  326.     {
  327.         ref array<Man> players = new array<Man>;
  328.         GetGame().GetPlayers( players );
  329.         int numPlayers = players.Count();
  330.         for ( int i = 0; i < players.Count(); ++i )
  331.         {
  332.             Man player = players.Get(i);
  333.             if( player )
  334.             {
  335.                 string messPlayers = "Players on the server: " + numPlayers.ToString() + "/120"
  336.                 Param1<string> m_MessageParam = new Param1<string>(messPlayers);
  337.                 GetGame().RPCSingleParam(player, ERPCs.RPC_USER_ACTION_MESSAGE, m_MessageParam, true, player.GetIdentity());
  338.             }
  339.         }
  340.     }
  341.    
  342.     override void StartingEquipSetup(PlayerBase player, bool clothesChosen)
  343.     {  
  344.     bool IsAdmin = false;
  345.     string SteamId_sasaa = "76561198015080948";
  346.     string SteamId_rene = "76561197973590083";
  347.     string SteamId_Mauss = "76561198015299671";
  348.     string SteamId_stefan = "76561198021971615";
  349.     string SteamId_tijmen = "76561198023029756";
  350.    
  351.     if (player.GetIdentity().GetPlainId() == SteamId_sasaa){
  352.         IsAdmin = true;
  353.     } else if (player.GetIdentity().GetPlainId() == SteamId_rene){
  354.         IsAdmin = true;
  355.     } else if (player.GetIdentity().GetPlainId() == SteamId_Mauss){
  356.         IsAdmin = true;
  357.     } else if (player.GetIdentity().GetPlainId() == SteamId_stefan){
  358.         IsAdmin = true;
  359.     } else if (player.GetIdentity().GetPlainId() == SteamId_tijmen){
  360.         IsAdmin = true;
  361.     } else {
  362.         IsAdmin = false;
  363.     }
  364.     if (IsAdmin){
  365.         // Admins DuctTape
  366.         player.RemoveAllItems();
  367.         player.GetInventory().CreateInInventory("TTSKOPants");
  368.         player.GetInventory().CreateInInventory("TTsKOJacket_Camo");
  369.         player.GetInventory().CreateInInventory("CombatBoots_Black");
  370.         player.GetInventory().CreateInInventory("HighCapacityVest_Black");
  371.         player.GetInventory().CreateInInventory("HuntingBag");
  372.         //! player.GetInventory().CreateInInventory("SmershVestBackpack");
  373.         //! player.GetInventory().CreateInInventory("GhillieSuit_Woodland");
  374.         //! player.GetInventory().CreateInInventory("GhillieHood_Woodland");
  375.         player.GetInventory().CreateInInventory("StoneKnife");
  376.         player.GetInventory().CreateInInventory("SodaCan_Cola");
  377.         player.GetInventory().CreateInInventory("SodaCan_Cola");
  378.         player.GetInventory().CreateInInventory("TacticalBaconCan");
  379.         player.GetInventory().CreateInInventory("TacticalBaconCan");
  380.         player.GetInventory().CreateInInventory("CanOpener");
  381.         player.GetInventory().CreateInInventory("BandageDressing");
  382.         player.GetInventory().CreateInInventory("BandageDressing");
  383.         player.GetInventory().CreateInInventory("DuctTape");
  384.         player.GetInventory().CreateInInventory("AmmoBox_9x19_25rnd");
  385.         player.GetInventory().CreateInInventory("AmmoBox_9x19_25rnd");
  386.         player.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
  387.         player.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
  388.         player.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
  389.         player.GetInventory().CreateInInventory("Mag_STANAGCoupled_30Rnd");
  390.         player.GetInventory().CreateInInventory("Mag_STANAGCoupled_30Rnd");
  391.         player.GetInventory().CreateInInventory("Mag_IJ70_8Rnd");
  392.         player.GetInventory().CreateInInventory("Mag_IJ70_8Rnd");
  393.         player.GetInventory().CreateInInventory("AmmoBox_380_35rnd");
  394.         player.GetInventory().CreateInInventory("AmmoBox_380_35rnd");
  395.            
  396.         // M4A1 Green
  397.         EntityAI ghillie_m4a1 = player.GetHumanInventory().CreateInInventory("M4A1_Green");
  398.         ghillie_m4a1.GetInventory().CreateAttachment("M4_Suppressor");
  399.         ghillie_m4a1.GetInventory().CreateAttachment("M4_RISHndgrd_Green");
  400.         ghillie_m4a1.GetInventory().CreateAttachment("M4_MPBttstck_Green");
  401.         //! ghillie_m4a1.GetInventory().CreateAttachment("GhillieAtt_Woodland");
  402.        
  403.         // M4A1 Green
  404.         EntityAI ghillie_marakov = player.GetHumanInventory().CreateInInventory("MakarovIJ70");
  405.         ghillie_marakov.GetInventory().CreateAttachment("PistolSuppressor");
  406.             /*!  - Not working jet
  407.             //Glock19
  408.             EntityAI Glock_ghilly = player.GetHumanInventory().CreateInInventory("Glock19");
  409.             Glock_ghilly.GetInventory().CreateAttachment("PistolSuppressor");
  410.             player.GetInventory().CreateInInventory("Mag_Glock_15Rnd");
  411.             player.GetInventory().CreateInInventory("Mag_Glock_15Rnd");
  412.             player.GetInventory().CreateInInventory("Mag_VSS_10Rnd");
  413.             player.GetInventory().CreateInInventory("Mag_VSS_10Rnd");
  414.             ItemBase sp6_ammo0 = player.GetInventory().CreateInInventory("Ammo_9x39");
  415.             sp6_ammo0.SetQuantity(20);
  416.             ItemBase sp6_ammo1 = player.GetInventory().CreateInInventory("Ammo_9x39");
  417.             sp6_ammo1.SetQuantity(20);
  418.             // Vss - Not working jet
  419.             EntityAI vss = player.GetHumanInventory().CreateInHands("VSS");
  420.             vss.GetInventory().CreateAttachment("GhillieAtt_Woodland");
  421.             vss.GetInventory().CreateAttachment("PSO11Optic");
  422.             */
  423.         // Porto
  424.         EntityAI Tools_portable = player.GetHumanInventory().CreateInInventory("PersonalRadio");
  425.         Tools_portable.GetInventory().CreateAttachment("Battery9V");
  426.         // Fireaxe
  427.         EntityAI Fireaxe_ghilly = player.GetHumanInventory().CreateInInventory("FirefighterAxe_Green");
  428.         // Rangefinder
  429.         EntityAI Tools_rangefinder = player.GetHumanInventory().CreateInInventory("Rangefinder");
  430.         Tools_rangefinder.GetInventory().CreateAttachment("Battery9V");
  431.     } else {
  432.         switch (Math.RandomInt(3, 11)) {
  433.             case 0:
  434.             // Knight
  435.             player.RemoveAllItems();
  436.             player.GetInventory().CreateInInventory("TaloonBag_Blue");
  437.             player.GetInventory().CreateInInventory("GreatHelm");
  438.             player.GetInventory().CreateInInventory("Kiwi");
  439.             player.GetInventory().CreateInInventory("Kiwi");
  440.             player.GetInventory().CreateInInventory("SodaCan_cola");
  441.             player.GetInventory().CreateInInventory("SodaCan_spite");
  442.             EntityAI Melee_Sword = player.GetInventory().CreateInInventory("Sword");
  443.             break;
  444.  
  445.             case 1:
  446.             // Miner
  447.             player.RemoveAllItems();
  448.             player.GetInventory().CreateInInventory("TaloonBag_Green");
  449.             player.GetInventory().CreateInInventory("WorkingGloves_Yellow");
  450.             player.GetInventory().CreateInInventory("Apple");
  451.             player.GetInventory().CreateInInventory("Apple");
  452.             player.GetInventory().CreateInInventory("SodaCan_Pipsi");
  453.             player.GetInventory().CreateInInventory("SodaCan_cola");
  454.             player.GetInventory().CreateInInventory("SpaghettiCan");
  455.             EntityAI Melee_Pickaxe = player.GetHumanInventory().CreateInInventory("Pickaxe");
  456.             break;
  457.            
  458.             case 2:
  459.             // Lumberjack
  460.             player.RemoveAllItems();
  461.             player.GetInventory().CreateInInventory("Shirt_RedCheck");
  462.             player.GetInventory().CreateInInventory("WorkingGloves_Brown");
  463.             player.GetInventory().CreateInInventory("Jeans_Blue");
  464.             player.GetInventory().CreateInInventory("WorkingBoots_Brown");
  465.             player.GetInventory().CreateInInventory("Ushanka_Green");
  466.             EntityAI Melee_woodaxe = player.GetHumanInventory().CreateInInventory("WoodAxe");
  467.             break;
  468.            
  469.             case 4:
  470.             // firefighter
  471.             player.RemoveAllItems();
  472.             player.GetInventory().CreateInInventory("FirefightersPants_Black");
  473.             player.GetInventory().CreateInInventory("FirefighterJacket_Black");
  474.             player.GetInventory().CreateInInventory("FirefightersHelmet_Red");
  475.             player.GetInventory().CreateInInventory("WorkingGloves_Black");
  476.             player.GetInventory().CreateInInventory("CombatBoots_Black");
  477.             player.GetInventory().CreateInInventory("SodaCan_Pipsi");
  478.             player.GetInventory().CreateInInventory("SodaCan_Cola");
  479.             player.GetInventory().CreateInInventory("BakedBeansCan");
  480.             EntityAI Melee_Fireaxe = player.GetInventory().CreateInInventory("FirefighterAxe_Black");
  481.             break;
  482.            
  483.             case 5:
  484.             // armyman
  485.             player.RemoveAllItems();
  486.             player.GetInventory().CreateInInventory("TTSKOPants");
  487.             player.GetInventory().CreateInInventory("TTsKOJacket_Camo");
  488.             player.GetInventory().CreateInInventory("TacticalGloves_Green");
  489.             player.GetInventory().CreateInInventory("CombatBoots_Black");
  490.             player.GetInventory().CreateInInventory("SmershBag");
  491.             player.GetInventory().CreateInInventory("CombatKnife");
  492.             player.GetInventory().CreateInInventory("SodaCan_Cola");
  493.             player.GetInventory().CreateInInventory("SodaCan_Pipsi");
  494.             player.GetInventory().CreateInInventory("TacticalBaconCan");
  495.             player.GetInventory().CreateInInventory("BandageDressing");
  496.             player.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
  497.             player.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
  498.             player.GetInventory().CreateInInventory("Mag_STANAGCoupled_30Rnd");
  499.             player.GetInventory().CreateInInventory("Mag_STANAGCoupled_30Rnd");
  500.             // M4A1 Green
  501.             EntityAI m4a1 = player.GetHumanInventory().CreateInInventory("M4A1_Green");
  502.             m4a1.GetInventory().CreateAttachment("M4_Suppressor");
  503.             m4a1.GetInventory().CreateAttachment("M4_RISHndgrd_Green");
  504.             m4a1.GetInventory().CreateAttachment("M4_OEBttstk_Green");
  505.             // Army_porta
  506.             EntityAI portable1 = player.GetHumanInventory().CreateInInventory("PersonalRadio");
  507.             portable1.GetInventory().CreateAttachment("Battery9V");
  508.             break;
  509.  
  510.             case 6:
  511.             // paramedic
  512.             player.RemoveAllItems();           
  513.             player.GetInventory().CreateInInventory("TaloonBag_Black");
  514.             player.GetInventory().CreateInInventory("ParamedicPants_Green");
  515.             player.GetInventory().CreateInInventory("ParamedicJacket_Green");
  516.             player.GetInventory().CreateInInventory("Athleticshoes_Grey");
  517.             player.GetInventory().CreateInInventory("KitchenKnife");
  518.             player.GetInventory().CreateInInventory("TaloonBag_Red");
  519.             player.GetInventory().CreateInInventory("Canteen");
  520.             player.GetInventory().CreateInInventory("SalineBagIV");
  521.             player.GetInventory().CreateInInventory("BandageDressing");
  522.             player.GetInventory().CreateInInventory("Morphine");
  523.             player.GetInventory().CreateInInventory("BloodBagIV");
  524.             player.GetInventory().CreateInInventory("ClearSyringe");
  525.             player.GetInventory().CreateInInventory("Morphine");
  526.             player.GetInventory().CreateInInventory("KitchenKnife");
  527.             break;
  528.  
  529.            
  530.             case 7:
  531.             // Hunter Autumn
  532.             player.RemoveAllItems();
  533.             // Hunter_pants = [HunterPants_Autumn,HunterPants_Brown,HunterPants_Spring,HunterPants_Summer,HunterPants_Winter]
  534.             // Hunter_jacket = [HuntingJacket_Autumn,HunterPants_Brown,HuntingJacket_Spring,HuntingJacket_Summer,HuntingJacket_Winter]
  535.             // Hunter_change = Math.RandomInt(3, 4)
  536.             player.GetInventory().CreateInInventory("unterPants_Autumn");
  537.             player.GetInventory().CreateInInventory("HuntingJacket_Autumn");
  538.             player.GetInventory().CreateInInventory("TacticalGloves_Black");
  539.             player.GetInventory().CreateInInventory("CombatBoots_Black");
  540.             player.GetInventory().CreateInInventory("HuntingKnife");
  541.             player.GetInventory().CreateInInventory("SmershBag");
  542.             break;
  543.  
  544.  
  545.             case 8:
  546.             // hunter Spring
  547.             player.RemoveAllItems();
  548.             player.GetInventory().CreateInInventory("HuntingJacket_Spring");
  549.             player.GetInventory().CreateInInventory("HunterPants_Spring");
  550.             player.GetInventory().CreateInInventory("TacticalGloves_Green");
  551.             player.GetInventory().CreateInInventory("HuntingJacket_Spring");
  552.             player.GetInventory().CreateInInventory("CombatBoots_Black");
  553.             player.GetInventory().CreateInInventory("SmershBag");
  554.             player.GetInventory().CreateInInventory("HuntingKnife");
  555.             player.GetInventory().CreateInInventory("Canteen");
  556.             player.GetInventory().CreateInInventory("TacticalBaconCan");
  557.             player.GetInventory().CreateInInventory("TacticalBaconCan");
  558.             break;
  559.            
  560.             case 9:
  561.             // Cop
  562.             player.RemoveAllItems();
  563.             player.GetInventory().CreateInInventory("PoliceJacket");
  564.             player.GetInventory().CreateInInventory("PolicePants");
  565.             player.GetInventory().CreateInInventory("CombatBoots_Grey");
  566.             player.GetInventory().CreateInInventory("Apple");
  567.             player.GetInventory().CreateInInventory("Apple");
  568.             player.GetInventory().CreateInInventory("Apple");
  569.             // Porto
  570.             EntityAI Police_porto = player.GetHumanInventory().CreateInInventory("PersonalRadio");
  571.             Police_porto.GetInventory().CreateAttachment("Battery9V");
  572.             // flashlight
  573.             EntityAI Police_flashlight = player.GetHumanInventory().CreateInInventory("Flashlight");
  574.             Police_flashlight.GetInventory().CreateAttachment("Battery9V");
  575.             break;
  576.            
  577.             case 10:
  578.             // Biker
  579.             player.RemoveAllItems();
  580.             player.GetInventory().CreateInInventory("Jeans_Black");
  581.             player.GetInventory().CreateInInventory("RidersJacket_Black");
  582.             player.GetInventory().CreateInInventory("MotoHelmet_Black");
  583.             player.GetInventory().CreateInInventory("CombatBoots_Black");
  584.             player.GetInventory().CreateInInventory("WorkingGloves_Black");
  585.             player.GetInventory().CreateInInventory("HuntingKnife");
  586.             player.GetInventory().CreateInInventory("BaseballBat");
  587.             break;
  588.            
  589.             case 11:
  590.             // mule
  591.             player.RemoveAllItems();
  592.             player.GetInventory().CreateInInventory("Jeans_Black");
  593.             player.GetInventory().CreateInInventory("Hoodie_Black");
  594.             player.GetInventory().CreateInInventory("AliceBag_Black");
  595.             player.GetInventory().CreateInInventory("Wellies_Black");
  596.             player.GetInventory().CreateInInventory("SodaCan_cola");
  597.             player.GetInventory().CreateInInventory("SodaCan_cola");
  598.             player.GetInventory().CreateInInventory("SodaCan_spite");
  599.             player.GetInventory().CreateInInventory("SodaCan_spite");
  600.             player.GetInventory().CreateInInventory("SodaCan_Kvass");
  601.             player.GetInventory().CreateInInventory("SodaCan_Kvass");
  602.             player.GetInventory().CreateInInventory("SodaCan_pipsi");
  603.             player.GetInventory().CreateInInventory("SodaCan_pipsi");
  604.             player.GetInventory().CreateInInventory("SpaghettiCan_Opened");
  605.             player.GetInventory().CreateInInventory("SpaghettiCan_Opened");
  606.             player.GetInventory().CreateInInventory("Apple");
  607.             player.GetInventory().CreateInInventory("Apple");
  608.             player.GetInventory().CreateInInventory("Apple");
  609.             player.GetInventory().CreateInInventory("Apple");
  610.             player.GetInventory().CreateInInventory("AmmoBox_00buck_10rnd");
  611.             player.GetInventory().CreateInInventory("AmmoBox_00buck_10rnd");
  612.             player.GetInventory().CreateInInventory("AmmoBox_380_35rnd");
  613.             player.GetInventory().CreateInInventory("AmmoBox_380_35rnd");
  614.             player.GetInventory().CreateInInventory("AmmoBox_45ACP_25rnd");
  615.             player.GetInventory().CreateInInventory("AmmoBox_45ACP_25rnd");
  616.             player.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
  617.             player.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
  618.             player.GetInventory().CreateInInventory("AmmoBox_762x39_20Rnd");
  619.             player.GetInventory().CreateInInventory("AmmoBox_762x39_20Rnd");
  620.             player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");
  621.             player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");
  622.             player.GetInventory().CreateInInventory("AmmoBox_9x19_25rnd");
  623.             player.GetInventory().CreateInInventory("AmmoBox_9x19_25rnd");
  624.             ItemBase sp6_ammo2 = player.GetInventory().CreateInInventory("Ammo_9x39");
  625.             sp6_ammo2.SetQuantity(20);
  626.             ItemBase sp6_ammo3 = player.GetInventory().CreateInInventory("Ammo_9x39");
  627.             sp6_ammo3.SetQuantity(20);
  628.             break;
  629.            
  630.            
  631.             case 12:
  632.             // Woodsman
  633.             player.RemoveAllItems();
  634.             player.GetInventory().CreateInInventory("BandanaMask_CamoPattern");
  635.             player.GetInventory().CreateInInventory("HuntingJacket_Autumn");
  636.             player.GetInventory().CreateInInventory("HunterPants_Autumn");
  637.             player.GetInventory().CreateInInventory("BaseballCap_Cammo");
  638.             player.GetInventory().CreateInInventory("CombatBoots_Black");
  639.             player.GetInventory().CreateInInventory("ImprovisedBag");
  640.             player.GetInventory().CreateInInventory("HuntingKnife");
  641.             player.GetInventory().CreateInInventory("HuntingKnife");
  642.             player.GetInventory().CreateInInventory("BaseballCap_Cammo");
  643.             player.GetInventory().CreateInInventory("Mag_Arrows_Quiver");
  644.             player.GetInventory().CreateInInventory("RecurveBow");
  645.             player.GetInventory().CreateInInventory("Ammo_ArrowPrimitive");
  646.             ItemBase Arrow_ammo0 = player.GetInventory().CreateInInventory("Ammo_ArrowPrimitive");
  647.             Arrow_ammo0.SetQuantity(5);
  648.             ItemBase Arrow_ammo1 = player.GetInventory().CreateInInventory("Ammo_ArrowPrimitive");
  649.             Arrow_ammo1.SetQuantity(5);
  650.             ItemBase Arrow_ammo2 = player.GetInventory().CreateInInventory("Ammo_ArrowPrimitive");
  651.             Arrow_ammo1.SetQuantity(5);
  652.             break;
  653.         }
  654.        
  655.         // Rags
  656.         ItemBase Items_Rags = player.GetInventory().CreateInInventory("Rag");
  657.         Items_Rags.SetQuantity(Math.RandomInt(3, 6));
  658.     }
  659.     }
  660. };
  661.  
  662. Mission CreateCustomMission(string path)
  663. {
  664.     return new CustomMission();
  665. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement