Board index Downloads Deus Ex MP Mods ]

[WIP] Counter-Strike mod


Author
Message
jager774
THIS IS SPARTAAA!!!
THIS IS SPARTAAA!!!

Posts: 358
Joined:
 02 Dec 2011, 22:07
Nationality:
Hungary


[WIP] Counter-Strike mod - Postby jager774 » 12 Jun 2013, 12:58


Hi!

I started working on a CS gametype//mod.
While im coding, im mapping for this too, as you've seen already i'm done with 35hp_2
Now im TRYING to create de_dust2 :)

but thats not the topic of this post so
back on topic:

i'll use bambi's 'mutator' to create the Buy Menu
i'll use clyzm's weapons with the whole mod(AK47, Shotgun, SawnOff Shotgun, Knife, Glock18, Silenced USP, and a Scout Tactical.)
as you may have seen in my KnifeArena gametype, you get a knife on start, thats cool but->

I wanna make the gametype give a glock to the NSF team and give a USP to the Unatco team on spawn.
The point of this would be to make it like CS, but keep it deus ex :wink:

Can anyone help me with the 'if' line that decides if the player is NSF or Unatco and decides which weapon they should get?

Atrey? DJ? Nobody?


~][FGS][Nobody~
Illuminated
Illuminated
User avatar

Posts: 5359
Joined:
 26 Oct 2005, 16:59
Location:
 Schland!
Nationality:
Germany


Re: [WIP] Counter-Strike mod - Postby ~][FGS][Nobody~ » 12 Jun 2013, 15:25


Code: Select all
//unatco check
if(player.PlayerReplicationInfo.Team == 0)
{
     //execute code for unatco player
}

//nsf check
if(player.PlayerReplicationInfo.Team == 1)
{
     //execute code for nsf player
}

Player is just a alias I used. You must ensure that it's a proper player reference yet.


Nobody is perfect...
-----------------------
ô¿ô¥[GODZ]¥NOCHANC wrote:I can ban any one I want ANY time I want. You have no rights here.

Magus wrote:Maybe one day I will understand your arcane rituals of voting :)

chin.democ. wrote:You can use light bulbs that emit light, and when shot, do not.

synthetic wrote:and while every person is interesting in their own unique ways, there is some degree of uniqueness that a doctor can help with.

~ô¿ô~][FGS][Nobody~ said: THERE IS NO SPOON!
~¤¥ÐJ¥¤~ said: THERE IS NO CAKE!
jager774
THIS IS SPARTAAA!!!
THIS IS SPARTAAA!!!

Posts: 358
Joined:
 02 Dec 2011, 22:07
Nationality:
Hungary


Re: [WIP] Counter-Strike mod - Postby jager774 » 12 Jun 2013, 15:43


Yyyup, that worked, thanks:)

Another question, to anyone who can help.

How much is the possibility of getting this code to work as a 'class' in the gametype?
Code: Select all
class DXCSGunShopMenu extends MenuUIScreenWindow;

var localized string l_help1, l_cpoint, l_lgun;
var MenuUIScrollAreaWindow winScroll;
var MenuUIListWindow lstGuns, lstPoints;
var MenuUISmallLabelWindow CurrentPoints, LeadingGun;
var DXL dxl;
var float RepTime;
var bool bStacking, blstGunsDone;
var DeusExPlayer player, p;
//var inventory inv;
var class<DeusExWeapon> weapon1;

replication
{

reliable if ( Role < ROLE_Authority)
   GiveWeapon, player;
}



event InitWindow()
{
local Window W;

Super.InitWindow();

if (actionButtons[2].btn != None)
if ((Player == None) || (Player.PlayerReplicationInfo == None) || !Player.PlayerReplicationInfo.bAdmin)
  actionButtons[2].btn.SetSensitivity(false);

   winClient.SetBackground(Texture'DeusExUI.MaskTexture');
   winClient.SetBackgroundStyle(DSTY_Modulated);
   
   W = winClient.NewChild(Class'Window');
   W.SetSize(ClientWidth, ClientHeight);
   W.SetBackground(Texture'DeusExUI.MaskTexture');
   //W.SetBackground(Texture'UWindow.Background');
   W.SetBackgroundStyle(DSTY_Modulated);
   W.Lower();
   
   CreateLabel(8, 7, l_lmap);
   LeadingGun = CreateLabel(16, 20, "");
   LeadingGun.SetWidth(180);
   
   lstPoints = MenuUIListWindow(winClient.NewChild(Class'MenuUIListWindow'));
   lstPoints.SetPos(8, 40);
   lstPoints.SetSize(208, 192);
   lstPoints.SetSensitivity(false);
   lstPoints.EnableAutoExpandColumns(false);
   lstPoints.EnableAutoSort(true);
   lstPoints.SetNumColumns(2);
   lstPoints.SetColumnType(0, COLTYPE_Float, "%.0f");
   lstPoints.SetColumnType(1, COLTYPE_String);
   lstPoints.SetSortColumn(0, true, false);  //reverse order
   lstPoints.SetColumnWidth(0, 28);
   lstPoints.SetColumnWidth(1, 180);
   
   CreateLabel(236, 7, l_cvote);
   CurrentPoints = CreateLabel(244, 20, "");
   CurrentPoints.SetWidth(180);
   
   winScroll = CreateScrollAreaWindow(winClient);
   winScroll.SetPos(236, 40);
   winScroll.SetSize(196, 192);
   
   lstGuns = MenuUIListWindow(winScroll.clipWindow.NewChild(Class'MenuUIListWindow'));
   lstGuns.EnableMultiSelect(false);
   lstGuns.EnableAutoExpandColumns(false);
   lstGuns.EnableAutoSort(false);
   lstGuns.SetNumColumns(2);
   lstGuns.SetColumnType(0, COLTYPE_String);
   lstGuns.SetColumnType(1, COLTYPE_String);
   lstGuns.SetSortColumn(0, false, false);  //case insensitive
   lstGuns.SetColumnWidth(0, 180);
   lstGuns.HideColumn(1);
   //lstGuns.DeleteAllRows();
   lstGuns.AddRow("AK47 $400");
   lstGuns.AddRow("XM1014 $200");
   lstGuns.AddRow("Knife $200");
   lstGuns.AddRow("Glock $100");
   lstGuns.AddRow("Steyr Scout $500");
   lstGuns.AddRow("Benelli M3 $200");
   lstGuns.AddRow("USP $400");
   
    bTickEnabled = true;
}

final function MenuUISmallLabelWindow CreateLabel(int X, int Y, string S)
{
   local MenuUISmallLabelWindow W;
   
   W = MenuUISmallLabelWindow(winClient.NewChild(Class'MenuUISmallLabelWindow'));
   W.SetPos(X, Y);
   W.SetText(S);
   W.SetWordWrap(false);

return W;
}

//do not change this cleanup code
event DestroyWindow()
{
bTickEnabled = false;

Player = DeusExPlayer(GetPlayerPawn());
if ((Player != None) && !Player.bDeleteMe)
{
if (ViewPort(Player.Player) != None)
  {
  Player.ClientMessage(l_help1);
  }
foreach Player.allactors(class'DXL', dxl)
  if (dxl.Owner == Player)
   dxl.MVM = None;
}

dxl = None;
Super.DestroyWindow();
}


//close window when death or end game screen displays
function bool CanPushScreen(class<DeusExBaseWindow> C)
{
if (ClassIsChildOf(C, class'HUDMultiplayer') || ClassIsChildOf(C, class'MultiplayerMessageWin'))
{
bStacking = true;
return true;
}

return Super.CanPushScreen(C);
}


function bool CanStack()
{
if (bStacking)
{
bStacking = false;
return false;
}

return Super.CanStack();
}


function Tick(float Delta)
{

   if ((lstGuns == None) || (lstPoints == None) || (dxl == None))
    return;
   
   Player = DeusExPlayer(GetPlayerPawn());   

   if ((Player != None) && !Player.bDeleteMe)
   {
      lstPoints.DeleteAllRows();
      lstPoints.AddRow(Player.SkillPointsAvail $ "$;");
   }
}

final function int MapNumToRow(int N)
{
local int I, R;

if ((lstGuns != None) && (N >= 0))
for (I = 0; I < lstGuns.GetNumRows(); I++)
  {
  R = lstGuns.IndexToRowId(I);
  if (int(lstGuns.GetField(R, 1)) == N)
   return R;
  }

return 0;
}


event bool ListRowActivated(window W, int R)
{
   //local int weapRowSelection;
   
   if ((W == lstGuns) && blstGunsDone)
    {
       dxl.ClientSetVote(int(lstGuns.GetField(R, 1)));
       CurrentPoints.SetText(lstGuns.GetField(R, 0));
       /*
       weapRowSelection = MapNumToRow(dxl.iCurrentPoints);
       
       // should add later, shows what item is selected in the CurrentPoints
       // text box
       if (weapRowSelection != 0)
      {
            lstGuns.SetFocusRow(weapRowSelection, true, false);
            lstGuns.SelectRow(weapRowSelection);
            CurrentPoints.SetText(lstGuns.GetField(weapRowSelection, 0));       
      }
      */
       return true;
    }

return Super.ListRowActivated(W, R);
}


event bool RawKeyPressed(EInputKey key, EInputState iState, bool bRepeat)
{
if ((key == IK_Enter) && (iState == IST_Release))
{
root.PopWindow();
return True;
}

return Super.RawKeyPressed(key, iState, bRepeat);
}

           
simulated final function GiveWeapon(Pawn PlayerPawn, string aClassName )
{
   local class<Weapon> WeaponClass;
   local Weapon NewWeapon;

   WeaponClass = class<Weapon>(DynamicLoadObject(aClassName, class'Class'));

   if( PlayerPawn.FindInventoryType(WeaponClass) != None )
      return;
   newWeapon = PlayerPawn.Spawn(WeaponClass);
   if( newWeapon != None )
   {
            newWeapon.RespawnTime = 0.0;
            newWeapon.GiveTo(PlayerPawn);
            newWeapon.bHeldItem = true;
            newWeapon.GiveAmmo(PlayerPawn);
                     
            newWeapon.AmbientGlow = 0;
            newWeapon.SetSwitchPriority(PlayerPawn);
            newWeapon.WeaponSet(PlayerPawn);
      if ( PlayerPawn.IsA('PlayerPawn') )
         newWeapon.SetHand(PlayerPawn(PlayerPawn).Handedness);
   }
}


simulated function ProcessAction(String S)
{   
   local Inventory inv;
   local Weapon newWeapon;
   local DeusExPlayer player1;
      if (S == "BUY")
      {
         player1 = DeusExPlayer(GetPlayerPawn());
       
            // hokay, basically the selectedrow isn't like 0, 1, 2,
            // like you would think. its like 533252143, so we call
            // indextorowid which gives us the RowId of row 0, 1, 2,
            // which we then can check if it equals the users
            // selected row
             
            if(lstGuns.GetSelectedRow() == lstGuns.IndexToRowId(0)){
             
           
               GiveWeapon(player1, "CStrike.CSWeaponAssaultGun");
           
         
               //inv = player1.Spawn(Class'CStrike.CSWeaponAssaultGun');
               //player.GiveInitialInventory(inv, 2, true);
               //player.SetInHand(weapon1);
               //inv.setOwner(player1);
               //inv.Frob(player1, inv);
               //inv.Frob(player, None);
               //inv.GiveTo(player);
               //inventory.SetBase(player);
               //inv = player.Spawn(Class'DeusEx.Ammo762mm');
               //inv.SetBase(player);
               //player.Weapon = DeusExWeapon(inv);
               //inv.bInObjectBelt = True;
               
            }
            if(lstGuns.GetSelectedRow() == lstGuns.IndexToRowId(1)){
               inv = player.Spawn(Class'CStrike.CSWeaponAssaultShotgun');
               inv.GiveTo(player);
               inv.bInObjectBelt = True;
            }
            if(lstGuns.GetSelectedRow() == lstGuns.IndexToRowId(2)){
               inv = player.Spawn(Class'CStrike.CSWeaponCombatKnife');
               inv.GiveTo(player);
               //inv.Frob(player, None);
               //inv.bInObjectBelt = True;
            }
            if(lstGuns.GetSelectedRow() == lstGuns.IndexToRowId(2)){
               inv = player.Spawn(Class'CStrike.CSWeaponPistol');
               inv.GiveTo(player);
               //inv.Frob(player, None);
               //inv.bInObjectBelt = True;
            }
            if(lstGuns.GetSelectedRow() == lstGuns.IndexToRowId(3)){
               inv = player.Spawn(Class'CStrike.CSWeaponRifle');
               inv.GiveTo(player);
               inv.bInObjectBelt = True;
            }
               if(lstGuns.GetSelectedRow() == lstGuns.IndexToRowId(4)){
               inv = player.Spawn(Class'CStrike.CSWeaponSawedOffShotgun');
               inv.GiveTo(player);
               //inv.Frob(player, None);
               //inv.bInObjectBelt = True;
            }
            if(lstGuns.GetSelectedRow() == lstGuns.IndexToRowId(5)){
               inv = player.Spawn(Class'CStrike.CSWeaponStealthPistol');
               inv.GiveTo(player);
               inv.bInObjectBelt = True;
            }
             
         }   
      else if (S == "TRAVEL")
       {
          if (lstGuns.GetSelectedRow() != 0)
           {
           Player.SwitchLevel(lstGuns.GetField(lstGuns.GetSelectedRow(), 0));  //server checks for admin
           actionButtons[2].btn.SetSensitivity(false);
           }
       }
   //Super.ProcessAction(S);
}


defaultproperties
{
RepTime=1.0
l_help1="Type 'Mutate guns' to display the menu."
l_cpoint="Weapon/Materiel Selection:"
l_lgun"Your Money:"
bUsesHelpWindow=False
actionButtons(0)=(Align=HALIGN_Right,Action=AB_OK)
actionButtons(1)=(Action=AB_Other,Text="BUY",Key="BUY")
actionButtons(2)=(Action=AB_Other,Text="AirStrike",Key="TRAVEL")
Title="Blackmarket"
ClientWidth=440
ClientHeight=244
bAlwaysRelevant=True
RemoteRole=ROLE_SimulatedProxy
NetPriority=1.5
}

If its possible, i appreciate any kind of help.
I suck at coding, I can only make basic things, so if any of you guys have the time, can you 'correct' this for me?
It was written by bambi @ dxalpha
its meant to be a buymenu
after several trials on compiling i was like :clout: ](*,)

DJ MAY KNOW ABOUT THIS :roll:

When I tried to compile it as it is, it said unknown type 'DXL' :c


~DJ~
Teh 1337'
Teh 1337'
User avatar

Posts: 2647
Joined:
 29 Jun 2008, 13:18


Re: [WIP] Counter-Strike mod - Postby ~DJ~ » 12 Jun 2013, 19:55


There should be a class called "DXL.uc", it's missing.. so uh, get it from where you got that class or talk to bambi?


That Resident Evil Mod
————
~][FGS][Nobody~ wrote:DONT SEARCH WORDS ON GOOGLE WITHOUT TINKING

~[FGS]SaSQuATcH~ wrote:you+serious=error

chin.democ. wrote:It's just what you're doing with your right hand that worries me....
jager774
THIS IS SPARTAAA!!!
THIS IS SPARTAAA!!!

Posts: 358
Joined:
 02 Dec 2011, 22:07
Nationality:
Hungary


Re: [WIP] Counter-Strike mod - Postby jager774 » 12 Jun 2013, 21:52


I PM-d bambi on DXAlpha, waiting for his reply.
until then
look at this:
:smt072


jager774
THIS IS SPARTAAA!!!
THIS IS SPARTAAA!!!

Posts: 358
Joined:
 02 Dec 2011, 22:07
Nationality:
Hungary


Re: [WIP] Counter-Strike mod - Postby jager774 » 13 Jun 2013, 13:37


Early screenshot of dust_2:)
Image


chin.democ.
chinny!
chinny!
User avatar

Posts: 2859
Joined:
 10 Aug 2006, 17:19
Location:
 London
Nationality:
Great Britain


Re: [WIP] Counter-Strike mod - Postby chin.democ. » 13 Jun 2013, 14:06


I'm not sure how you approach mapping Jager but I will say this - It's always best to complete the basic layout of the map first before adding in custom textures and all the frilly bits, apologies if you have already done it this way.

The map screenshot looks good, already looks like your mapping has improved since your last map.


jager774
THIS IS SPARTAAA!!!
THIS IS SPARTAAA!!!

Posts: 358
Joined:
 02 Dec 2011, 22:07
Nationality:
Hungary


Re: [WIP] Counter-Strike mod - Postby jager774 » 13 Jun 2013, 14:45


chin.democ. wrote:The map screenshot looks good, already looks like your mapping has improved since your last map.

Since my last map. Erm. 35hp_2?:D

Thanks tho :wink:


jager774
THIS IS SPARTAAA!!!
THIS IS SPARTAAA!!!

Posts: 358
Joined:
 02 Dec 2011, 22:07
Nationality:
Hungary


Re: [WIP] Counter-Strike mod - Postby jager774 » 14 Jun 2013, 23:33


Aaand im done! ( Yep its only the long part, but i will finish the other parts too, when i got time. For the last days i didnt play anything, this map took all my time :ney:
Now, im going to play some dx and take a restD:
Anyway here it is:
DXCS_Dust2_long.rar

THE MAP IS SO *loving* HUGE :ney:
i oversized it:\
can i downsize it a little bit somehow?:o
Otherwise i think its good

Whats your opinion guys?


You do not have the required permissions to view the files attached to this post.
chin.democ.
chinny!
chinny!
User avatar

Posts: 2859
Joined:
 10 Aug 2006, 17:19
Location:
 London
Nationality:
Great Britain


Re: [WIP] Counter-Strike mod - Postby chin.democ. » 15 Jun 2013, 12:23


It's missing a file package hanger 18 or something similarly named.


jager774
THIS IS SPARTAAA!!!
THIS IS SPARTAAA!!!

Posts: 358
Joined:
 02 Dec 2011, 22:07
Nationality:
Hungary


Re: [WIP] Counter-Strike mod - Postby jager774 » 15 Jun 2013, 13:28


Hangar18.rar


You do not have the required permissions to view the files attached to this post.
~][FGS][Nobody~
Illuminated
Illuminated
User avatar

Posts: 5359
Joined:
 26 Oct 2005, 16:59
Location:
 Schland!
Nationality:
Germany


Re: [WIP] Counter-Strike mod - Postby ~][FGS][Nobody~ » 25 Jun 2013, 18:18


You didn't edit/modify an existing old texture package without renaming, did you? :-s


Nobody is perfect...
-----------------------
ô¿ô¥[GODZ]¥NOCHANC wrote:I can ban any one I want ANY time I want. You have no rights here.

Magus wrote:Maybe one day I will understand your arcane rituals of voting :)

chin.democ. wrote:You can use light bulbs that emit light, and when shot, do not.

synthetic wrote:and while every person is interesting in their own unique ways, there is some degree of uniqueness that a doctor can help with.

~ô¿ô~][FGS][Nobody~ said: THERE IS NO SPOON!
~¤¥ÐJ¥¤~ said: THERE IS NO CAKE!
jager774
THIS IS SPARTAAA!!!
THIS IS SPARTAAA!!!

Posts: 358
Joined:
 02 Dec 2011, 22:07
Nationality:
Hungary


Re: [WIP] Counter-Strike mod - Postby jager774 » 26 Jun 2013, 10:07


Yea i forgot to rename it before saving:(


Magus
THIS IS SPARTAAA!!!
THIS IS SPARTAAA!!!
User avatar

Posts: 345
Joined:
 27 Aug 2005, 15:41
Location:
 Manchester, England
Nationality:
Great Britain


Re: [WIP] Counter-Strike mod - Postby Magus » 26 Jun 2013, 18:59


jager774 wrote:Yea i forgot to rename it before saving:(

whywouldyoudothis.jpg


-- Magus "There are 10 kinds of people in the world - those who understand binary, and those who don't"
Image
jager774
THIS IS SPARTAAA!!!
THIS IS SPARTAAA!!!

Posts: 358
Joined:
 02 Dec 2011, 22:07
Nationality:
Hungary


Re: [WIP] Counter-Strike mod - Postby jager774 » 27 Jun 2013, 10:08


Magus wrote:
jager774 wrote:Yea i forgot to rename it before saving:(

whywouldyoudothis.jpg

idk.avi




Return to MP Mods

Who is online

Users browsing this forum: No registered users and 8 guests