Results 1 to 9 of 9

Thread: [COD4] moving the hud element based on which team the client joins ?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    Quote Originally Posted by Kaz View Post
    Thanks serthy,
    i know the basics of the hud and MoveOverTime won't help me with what i want for this case since the move have to be based on if the client joins as spectator or as a player not time based
    Afaik, in CoD4 you can hook the functions IzNoGoD mentioned. And then check the team player.pres["team"] == "spectator" // or "axies"/"allies" (if even neccesary) and change the HUD accordingly.

    PHP Code:
    FUNC onJoinedTeam()
        IF 
    player team is spectator
            move hud to mid
        
    ELSE
            
    move hud to corner
        
    ENDIF
    END 
    However all this stuff should already be (in parts) in the stock gamefiles, if you know the basics of a HUD, you should also be able to figure it out where and how to move them as you like, as this is one of the simpliest things you can do in scripting.
    Last edited by serthy; 22nd May 2016 at 15:27.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •