Results 1 to 10 of 10
  1. #1
    MonsterCat
    Insan3Lik3
    CheeseToast's Avatar
    Join Date
    Apr 2011
    Location
    Calgary, Alberta, Canada
    Posts
    4,684
    Points
    4,169
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Location
    Calgary, Alberta, Canada
    Posts
    4,684
    Points
    4,169

    Contact info:

    Youtube Channel: http://www.youtube.com/CheeseToastHax

    Default Dear TlPwnzer or JellyInjector.

    You guys seem like you can fix this problem I have, but.. I am 95% sure that you can't without changing the base. MW3 has a mind of it's own, prove to me it doesn't.
    Here's my problem,
    1. Host spawn's with the flag when it spawn in a specific location
    2. Very hard to drop the flag and you don't drop it 90% of the time
    3. People share the flag.

    Prove to me you are good at modding ;)

    I also just started it from scratch recently to eliminate bugs as soon as I find but.. no luck.

    Code:
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;
    #include maps\mp\gametypes\_class;
    #include common_scripts\utility;
    
    main()
    {
        thread onPlayerConnect();
        level.FlagOnGround = true;
    }
    
    onPlayerConnect()
    {
        for(;;)
        {
            level waittill("connecting", player);
            player thread MyPoints();
            player thread ReachedScoreLimit();
            wait 15;
            if(player isHost())
            {
                player thread SpawnFlag();
            }
            player thread CarryFlag();
            player thread DropFlag();
            player thread PickUpFlag();
        }
    }
    
    onPlayerSpawned()
    {
        for(;;)
        {
            self waittill("spawned_player");
            self thread Settings();
        }
    }
    
    Settings()
    {
        self.Carrier = false;
        self.maxhealth = 150;                            
        self.health = self.maxhealth; 
    }
    
    MyPoints()
    {
        self.points = 0;
    }
    
    ReachedScoreLimit()
    {
        self endon( "disconnect" );
        IamTheWinner = "^2"+self.name+" Has won.. a cookie!!\nYou mad bro?";
        for(;;)
        {
            if(self.points >= 100)
            {
                maps\mp\gametypes\_gamelogic::endGame( "axis", IamTheWinner );
            }
            wait 0.1;
        }
    }
    
    SpawnFlag()
    {
        level.TheFlag = spawn( "script_model", ( -1647, -1363, 288) );
        level.TheFlag setModel( "prop_flag_neutral" );
        level.TheFlag.angles = (0,0,0);    
    }
    
    CarryFlag()
    {
        for(;;)
        {
            while(self.Carrier == true)
            {
                level.TheFlag moveTo( self.origin, 0.1 );
                self.points+=0.1;
                wait 0.1;
            }
            wait 0.1;
        }
    }
    
    DropFlag()
    {
        for(;;)
        {    
            if(self.Carrier == true && level.FlagOnGround == false && !IsAlive(self))
            {
                wait 2;
                level.FlagOnGround = true;
                self.Carrier = false;
            }
            wait 0.01;
        }
    }
    
    PickUpFlag()
    {
        for(;;)
        {
            if( distance( self.origin, level.TheFlag.origin ) < 60 && level.FlagOnGround == true && self.Carrier == false) 
            {
                self iPrintlnBold( "You have the flag, you are the carrier!" );
                level.FlagOnGround = false;
                self.Carrier = true;
            }
            wait 0.01;
        }    
    }

    0 Not allowed! Not allowed!
    "It's better to lose an argument/debate then to win. Cause when you lose you grow as a person."
    -CheeseToast

  2. #2
    Formally known as Tlpwnzer KazzababeGamer's Avatar
    Join Date
    Jun 2011
    Posts
    2,947
    Points
    5,427
         User Info     Contact     Gamer ID
    Join Date
    Jun 2011
    Posts
    2,947
    Points
    5,427

    Default

    Just a word of advice, spawning the flag "NOT" in main() probably wasn't a good idea.
    It's always best to spawn the flag as soon as the game starts instead of spawning it in onPlayerConnected() or something like that.

    0 Not allowed! Not allowed!

  3. #3
    MonsterCat
    Insan3Lik3
    CheeseToast's Avatar
    Join Date
    Apr 2011
    Location
    Calgary, Alberta, Canada
    Posts
    4,684
    Points
    4,169
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Location
    Calgary, Alberta, Canada
    Posts
    4,684
    Points
    4,169

    Contact info:

    Youtube Channel: http://www.youtube.com/CheeseToastHax

    Default

    Thanks but I must ask.. does "self" exist in main()?
    like onplayerconnect, the variable "self" is "player" and onplayerspawned is "self" I know I can make a script from main() and then use self but I don't want to look like a complete n00b. Kinda like I put a
    "self.point = 0" in a script and only in that script because the variable self can't be used in onplayerconnect, that also makes me ask.
    If I change the variable from player, to level, to self, will the variable be the same thing? Can a variable change prefixes?

    0 Not allowed! Not allowed!
    "It's better to lose an argument/debate then to win. Cause when you lose you grow as a person."
    -CheeseToast

  4. #4
    Lskip Dont Double Dip
    Join Date
    Nov 2011
    Posts
    550
    Points
    265
         User Info     Contact     Gamer ID
    Join Date
    Nov 2011
    Posts
    550
    Points
    265

    Contact info:

    Youtube Channel: http://www.youtube.com/user/lskip13?feature=mhee

    Default

    Quote Originally Posted by CheeseToast View Post
    Thanks but I must ask.. does "self" exist in main()?
    like onplayerconnect, the variable "self" is "player" and onplayerspawned is "self" I know I can make a script from main() and then use self but I don't want to look like a complete n00b. Kinda like I put a
    "self.point = 0" in a script and only in that script because the variable self can't be used in onplayerconnect, that also makes me ask.
    If I change the variable from player, to level, to self, will the variable be the same thing? Can a variable change prefixes?
    Im pretty sure that
    onPlayerSpawned() is self thread blah
    onPlayerConnect() is player thread blah
    and
    main() is level thread blah or i think level.thread or whatever idk im not sure that will help you but just trying to help lol

    0 Not allowed! Not allowed!

  5. #5
    MonsterCat
    Insan3Lik3
    CheeseToast's Avatar
    Join Date
    Apr 2011
    Location
    Calgary, Alberta, Canada
    Posts
    4,684
    Points
    4,169
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Location
    Calgary, Alberta, Canada
    Posts
    4,684
    Points
    4,169

    Contact info:

    Youtube Channel: http://www.youtube.com/CheeseToastHax

    Default

    I knew that the first time I started modding.. I'm talking about variables.
    Level thread is pointless because you can just do thread.

    0 Not allowed! Not allowed!
    "It's better to lose an argument/debate then to win. Cause when you lose you grow as a person."
    -CheeseToast

  6. #6
    #HitlerDidNothingWrong
    ⌘Flying Dutchman⌘

    Join Date
    Apr 2011
    Posts
    4,018
    Points
    8,445
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Posts
    4,018
    Points
    8,445
    Gamer IDs

    Steam ID: baktiar77 Wii Code: baktiar77

    Contact info:

    Youtube Channel: http://www.youtube.com/user/77baktiar

    Default

    If you need help on mooding, I think you should head over to codwii they tend to know shit

    0 Not allowed! Not allowed!

  7. #7
    Formally known as Tlpwnzer KazzababeGamer's Avatar
    Join Date
    Jun 2011
    Posts
    2,947
    Points
    5,427
         User Info     Contact     Gamer ID
    Join Date
    Jun 2011
    Posts
    2,947
    Points
    5,427

    Default

    You coded this "awkwardly", nvm.

    0 Not allowed! Not allowed!

  8. #8
    MonsterCat
    Insan3Lik3
    CheeseToast's Avatar
    Join Date
    Apr 2011
    Location
    Calgary, Alberta, Canada
    Posts
    4,684
    Points
    4,169
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Location
    Calgary, Alberta, Canada
    Posts
    4,684
    Points
    4,169

    Contact info:

    Youtube Channel: http://www.youtube.com/CheeseToastHax

    Default

    Quote Originally Posted by baktiar77 View Post
    If you need help on mooding, I think you should head over to codwii they tend to know shit
    I tend to know my shit too.
    JellyInjector keeps telling me that over and over but what he doesn't understand is I know this.
    It's as easy as abc.

    This is why I hate MW3. Blackops just works. MW3 is full of bugs when it comes to coding.
    It goes to simple things like making a variable be true or false. The game doesn't listen and the variable continues to be true.

    0 Not allowed! Not allowed!
    "It's better to lose an argument/debate then to win. Cause when you lose you grow as a person."
    -CheeseToast

  9. #9
    ABlackGuy's Avatar

    Badge

    Join Date
    Jul 2011
    Location
    Yes
    Posts
    4,403
    Points
    5,430
         User Info     Contact     Gamer ID
    Join Date
    Jul 2011
    Location
    Yes
    Posts
    4,403
    Points
    5,430
    Gamer IDs

    PSN ID: X_-ABlackGuy-_X

    Default

    You really couldnt just PM Pwnzer or go to CODWii for Jelly?

    0 Not allowed! Not allowed!


  10. #10
    MonsterCat
    Insan3Lik3
    CheeseToast's Avatar
    Join Date
    Apr 2011
    Location
    Calgary, Alberta, Canada
    Posts
    4,684
    Points
    4,169
         User Info     Contact     Gamer ID
    Join Date
    Apr 2011
    Location
    Calgary, Alberta, Canada
    Posts
    4,684
    Points
    4,169

    Contact info:

    Youtube Channel: http://www.youtube.com/CheeseToastHax

    Default

    No I couldn't.

    0 Not allowed! Not allowed!
    "It's better to lose an argument/debate then to win. Cause when you lose you grow as a person."
    -CheeseToast

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -10. The time now is 01:48 PM.
Powered by vBulletin®
Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.