Skip to content
  • 0 Unread 0
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. can someone please help me with this?

can someone please help me with this?

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
12 Posts 3 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • AutoTopGR AutoTopGR

    it gives me an error in an unrelated line when i try to compile it and i don;t understand why

    chicken emoji Offline
    chicken emoji Offline
    chicken emoji
    wrote on last edited by
    #3

    AutoTopGR the path of the included files isnt supposed to be a string thats why you probably get error in line 0 or do you get another error?

    AutoTopGR 1 Reply Last reply
    0
    • chicken emoji chicken emoji

      AutoTopGR the path of the included files isnt supposed to be a string thats why you probably get error in line 0 or do you get another error?

      AutoTopGR Offline
      AutoTopGR Offline
      AutoTopGR
      wrote on last edited by
      #4

      chicken emoji so i have to remove #symbol?

      chicken emoji 1 Reply Last reply
      0
      • AutoTopGR AutoTopGR

        chicken emoji so i have to remove #symbol?

        chicken emoji Offline
        chicken emoji Offline
        chicken emoji
        wrote on last edited by chicken emoji
        #5

        AutoTopGR what i mean is without the " so instead of

        #include "maps/mp/_utility";
        

        try

        #include maps/mp/_utility;
        
        AutoTopGR 1 Reply Last reply
        0
        • chicken emoji chicken emoji

          AutoTopGR what i mean is without the " so instead of

          #include "maps/mp/_utility";
          

          try

          #include maps/mp/_utility;
          
          AutoTopGR Offline
          AutoTopGR Offline
          AutoTopGR
          wrote on last edited by
          #6

          chicken emoji thanks it fixed the compiling problem but when i try to start a zombies map i get these **** Unresolved external : "createfx" with 4 parameters in "main" at line 1 ****
          **** Unresolved external : "createfontstring" with 5 parameters in "main" at lines 1,1 ****
          **** Unresolved external : "hudsetelementtext" with 3 parameters in "main" at l any ideas?

          chicken emoji 1 Reply Last reply
          0
          • AutoTopGR AutoTopGR

            chicken emoji thanks it fixed the compiling problem but when i try to start a zombies map i get these **** Unresolved external : "createfx" with 4 parameters in "main" at line 1 ****
            **** Unresolved external : "createfontstring" with 5 parameters in "main" at lines 1,1 ****
            **** Unresolved external : "hudsetelementtext" with 3 parameters in "main" at l any ideas?

            chicken emoji Offline
            chicken emoji Offline
            chicken emoji
            wrote on last edited by chicken emoji
            #7

            AutoTopGR To use createfontstring you have to include maps/mp/gametypes_zm/_hud_util. For hudsetelementtext i cant find a definition where do you have it from or did you make it yourself and what is it supposed to do?

            AutoTopGR 1 Reply Last reply
            0
            • chicken emoji chicken emoji

              AutoTopGR To use createfontstring you have to include maps/mp/gametypes_zm/_hud_util. For hudsetelementtext i cant find a definition where do you have it from or did you make it yourself and what is it supposed to do?

              AutoTopGR Offline
              AutoTopGR Offline
              AutoTopGR
              wrote on last edited by
              #8

              chicken emoji i made it my self and it supposed to write in the center of the screen +100 if i kill a zombie and +150 if i kill it with headshot

              chicken emoji 1 Reply Last reply
              0
              • AutoTopGR AutoTopGR

                chicken emoji i made it my self and it supposed to write in the center of the screen +100 if i kill a zombie and +150 if i kill it with headshot

                chicken emoji Offline
                chicken emoji Offline
                chicken emoji
                wrote on last edited by
                #9

                AutoTopGR then you have to write the definition in this file or include the file that has the definitio

                AutoTopGR 1 Reply Last reply
                0
                • chicken emoji chicken emoji

                  AutoTopGR then you have to write the definition in this file or include the file that has the definitio

                  AutoTopGR Offline
                  AutoTopGR Offline
                  AutoTopGR
                  wrote on last edited by
                  #10

                  chicken emoji what do you mean when you say definition?

                  chicken emoji 1 Reply Last reply
                  0
                  • AutoTopGR AutoTopGR

                    chicken emoji what do you mean when you say definition?

                    chicken emoji Offline
                    chicken emoji Offline
                    chicken emoji
                    wrote on last edited by chicken emoji
                    #11

                    AutoTopGR The same thing you did with DisplayKillPoints is you define the function which is this part

                    DisplayKillPoints()
                    {
                    self endon ("disconnect");
                    level endon("game_ended");
                    
                    for(;;)
                    {
                        player waittill("killed_zombie");
                        if(player.killed_zombie_by_headshot)
                        {
                            createFx( "blood_splash_headshot", player.origin, player.angles, player );
                            createFontString( "objective", "hudsmall", 2.2, player.origin + (0,0,80), (1,1,0) ) + "+150";
                            hudSetElementText( player, "objective", "+150" );
                        }
                        else
                        {
                            createFx( "blood_splash_zombie", player.origin, player.angles );
                            createFontString( "objective", "hudsmall", 2.2, player.origin + (0,0,80), (1,1,0) ) + "+100";
                            hudSetElementText( player, "objective", "+100" );
                        }
                    }
                    
                    

                    and then you execute it like this

                    player thread DisplayKillPoints();
                    

                    with hudsetelementtext you try to execute it like this

                    hudSetElementText( player, "objective", "+100" );
                    

                    but there is no definition like this

                    hudSetElementText(){
                        //Things this function is supposed to do
                    }
                    

                    also createFontString only uses 2 parameters which are font and scale so you should change it to createFontString( "objective", "hudsmall" );.

                    if you want to change the position or what it dispalys you can do this

                    killpointshud = createFontString( "objective", "hudsmall" );
                    

                    instead of just

                    createFontString( "objective", "hudsmall" );
                    

                    and then change the position of the hud element like this

                    killpointshud setpoint( "CENTER", "CENTER", 0, 0 );
                    

                    or set what it displays using

                    killpointshud setText(text);
                    

                    or

                    killpointshud setValue(value);
                    

                    You should also change all the player in DisplayKillPoints to self because player is undefined in this context what i mean is for example change this

                    player waittill("killed_zombie");
                    

                    to

                    self waittill("killed_zombie");
                    

                    but only do this in the DisplayKillPoints function

                    1 Reply Last reply
                    0
                    • AutoTopGR AutoTopGR

                      #include "maps/mp/_utility";
                      #include "maps/mp/_hud_util";
                      #include "maps/mp/_createfx";

                      init()
                      {
                      level thread OnPlayerConnected();
                      }

                      OnPlayerConnected()
                      {
                      for(;;)
                      {
                      level waittill("connected", player);

                          if (isDefined(player.pers["isBot"]) && player.pers["isBot"])
                          {
                              continue;
                          }
                      
                          player thread DisplayKillPoints();
                      }
                      

                      }

                      DisplayKillPoints()
                      {
                      self endon ("disconnect");
                      level endon("game_ended");

                      for(;;)
                      {
                          player waittill("killed_zombie");
                          if(player.killed_zombie_by_headshot)
                          {
                              createFx( "blood_splash_headshot", player.origin, player.angles, player );
                              createFontString( "objective", "hudsmall", 2.2, player.origin + (0,0,80), (1,1,0) ) + "+150";
                              hudSetElementText( player, "objective", "+150" );
                          }
                          else
                          {
                              createFx( "blood_splash_zombie", player.origin, player.angles );
                              createFontString( "objective", "hudsmall", 2.2, player.origin + (0,0,80), (1,1,0) ) + "+100";
                              hudSetElementText( player, "objective", "+100" );
                          }
                      }
                      

                      }

                      JezuzLizard Offline
                      JezuzLizard Offline
                      JezuzLizard
                      Plutonium Staff
                      wrote on last edited by
                      #12

                      AutoTopGR ChatGPT moment.

                      1 Reply Last reply
                      0

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better 💗

                      Register Login
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Unread 0
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Donate