Page 1 of 5 123 ... LastLast
Results 1 to 10 of 43

Thread: Player Specing

  1. #1
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default Player Specing

    2\14\12 - Updated and packaged by armageddon
    To make this work, you must be logged in as Admin using the Reborn admins.ini file, and using Reborn 2.5 Gamma+
    Then, in the game,
    if you want to watch player number 7 for example. type in console : keyp 1007
    if you want to watch player number 14 for example. type in console : keyp 1014 ,etc...

    It would be easier to put this command in an admin menu. For client 7, stuffcommand keyp 1007 or client 14 stuffcommand keyp 1014, etc...

    To stop watching a player, press the Use key or Mouse button.

    I made the keyp 1000-1031 for a 32 slot server in global/keypresshandler.scr

    If you are using global/dmprecache.scr for other mods, then add this line to it.
    Code:
    local.result = registerev "keypress" global/keypresshandler.scr //This will let Reborn know to execute that .scr file whenever a client sends a keyp command.

    DOWNLOAD




    2\13\12

    This is Elgan's work (Nice job Elg), with the help from the team for brainstorming...

    Here we go..

    @Elgan, if you need me to update this post, just let me know!
    -----------------------------------------------------------------------
    NOW THIS....

    should give the admin a message when the spectated , suspected player is looking / aiming/ firing at a player...and through a wall..

    "aiming at playername through wall"
    "firing at playername through wall"
    or just
    "aiming at playername"
    "firing at playername"


    ...now this I did through on my bros moh to quickly test..it sort is ok but a bit crude...not brilliant detection.

    Code:
    spec:
    
    local.admin = $player[2]
    local.player = $player[1]
    
    if( local.admin == NULL || local.admin == NIL)
    {
    end
    }
    if( local.player == NULL || local.player == NIL)
    {
    end
    }
    
          local.inradius = vector_within local.admin.origin local.player.origin 130 
    
    local.camera = spawn Camera
    
    local.camera targetname ("cam" + local.player.entnum)
    local.camerause = spawn trigger_camerause target ("cam" + local.player.entnum)
    local.camerause doUse local.admin
    
    local.sorigin = spawn script_origin targetname "origin"
    local.sorigin notsolid
    
     local.camera notsolid
     
     while(1)
     {
        waitframe
        
        
        local.CAMorigin = local.player.origin - local.player.forwardvector * 100 + ( 0 0 100 )
        //trace back to make sure its valid
        local.CAMorigin = trace ( local.player.origin + ( 0 0 100 )) local.CAMorigin
        local.ENTorigin = local.player.origin + ( 0 0 70 )
        
        
    //    local.sorigin.origin = waitthread setheight local.ENTorigin ( local.player.origin[2] + 100 )
        local.camera.origin = waitthread setheight local.CAMorigin ( local.player.origin[2] + 100 )
            
        local.sorigin.origin = local.player.origin + angles_toforward local.player.viewangles * 100
        local.sorigin.origin += ( 0 0 100 ) //what we are abiove
        
        //the only way to make this not "jault" more is to smooth angle difference...something like...
        // then get the cameras viewangles and make them head toward the new..
        //localnewangles_viewangles = angled_topointatw(local.admin.origin) 
        // quite frankly would get a little silly...and I cant remember the  cmd off the top of my view to get angles looking at an ant.
        // OR make an ent and move it with the player but smoother, same as this and make the camera look at that.
        
        
        //local.camera lookat local.admin
        
        local.camera lookat local.sorigin
    
    
        //are we looking at a player
        waitthread looking_at_player local.player local.admin
     }
     
    end
    
    
    setheight local.origin local.dist:
    
        
        local.height = local.origin[2]
    
        if(local.height > local.dist)
        {
            local.dist = local.height - local.dist
            local.dist = local.dist / 100 * 10
            local.height -= local.dist
        }
        else if(local.height < local.dist)
        {
            local.dist = local.dist  - local.height
            local.dist = local.dist / 100 * 10
            local.height+= local.dist
        }
        
        local.origin[2] = local.height
        
        
    end local.origin
    
    
    looking_at_player local.suspect local.admin:
    
    level.PLAYERWIDTH = 35 // half a player width?
    
        for(local.i = 1;local.i <= $player.size;local.i++)
        {
            local.player = $player[local.i]
            
            if(local.player != local.suspect)
            {
                local.vector_dist = ( local.player.origin - local.suspect.origin )    // get vector between distance?
                local.distance = vector_length( local.player.origin - local.suspect.origin )    // get vector between distance?
        
                //player is local.distance away from player under spec
                //get the point equal distance away from the centre of the suspects view
                //local.centroid = local.suspect.origin +  (local.suspect.forwardvector * local.distance )
                local.centroid = local.suspect.origin + angles_toforward local.suspect.viewangles * local.distance
    
                //get how far accros we can see at this distance.
                iprintln local.distance
                //no...check to see if the player is what we are aiming at.
                // 30
                local.distance_from_centroid = vector_length( local.player.origin - local.centroid )    
        
                if(local.distance_from_centroid <= level.PLAYERWIDTH)
                {
                    local.name = netname local.player
                
                    if( ! (local.suspect cansee local.player))
                    {
                        local.isthroughwall = " through a wall"
                    }
                    else
                    {
                        local.isthroughwall = ""
                    }        
                            
                    if(local.suspect.fireheld == 1)
                    {
                        local.aiming = "Firing at "
                    }
                    else
                    {
                        local.aiming = " Aiming at "
                    }
                    
                    //hud print this might be BETTER
                    local.admin iprint (local.aiming + local.name + local.isthroughwall)  1
                }        
            }
        }
        
    end

  2. #2

    Default

    James, I don't know if you want to update your post with this info, or not, but here is the mod packaged up.

    Thanks Elgan for making this for us!!

    To make this work, you must be logged in as Admin using the Reborn admins.ini file, and using Reborn 2.5 Gamma+
    Then, in the game,
    if you want to watch player number 7 for example. type in console : keyp 1007
    if you want to watch player number 14 for example. type in console : keyp 1014 ,etc...

    It would be easier to put this command in an admin menu. For client 7, stuffcommand keyp 1007 or client 14 stuffcommand keyp 1014, etc...

    To stop watching a player, press the Use key or Mouse button.

    I made the keyp 1000-1031 for a 32 slot server in global/keypresshandler.scr

    If you are using global/dmprecache.scr for other mods, then add this line to it.
    Code:
    local.result = registerev "keypress" global/keypresshandler.scr //This will let Reborn know to execute that .scr file whenever a client sends a keyp command.
    Attached Files Attached Files

  3. #3
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    Done! Thanks man!

  4. #4

    Default

    hmm...finding things I don't like. Like sound. We need to update admin position to reflect camera position so that the sounds are coming from that location instead of across the map where you started spectating from.

    I added some other things too. Once I get it all sorted out, I will re-upload it.

  5. #5

    Default

    Perhaps...
    PHP Code:
    main:
        
    local.result registerev "keypress" global/keypresshandler.scr::keypress
    end

    keypress local
    .player local.keynum:
        
    wait 1
        local
    .maxplayers int(getcvar(sv_maxclients))
        
        if(
    local.player isadmin)
        {
            if(
    local.keynum 1000 && local.keynum < (local.maxplayers 1000)) 
            {
                
    local.keynum local.keynum 1000  //Get the actual Client Number
                
    exec global/spec.scr local.player local.keynum
            
    }
        }
        
    end 
    So a simple
    PHP Code:
    exec global/keypresshandler.scr 
    will suffice and all slot amounts are supported.

    Aside from that nitpicking.. I will definitely give this a try.
    Thanks in advance for the effort Elgan and armageddon.
    =|UWS|=|SA|Vince - Head Serveradmin - mohaa.uwsclan.us (MOH:AA - FT)

  6. #6
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    Yeah that should work wargamer.

    @armageddon, I'll wait for the update and then update my post! Thanks again guys!

  7. #7

    Default

    Hey guys i just tryed this out on my server and it looks good, I have a FT server so i was dead and thought id try it when i was dead intstead of going into spec just to see if it worked and it worked fine but then i got melted and respawned but it had me in spec mode and then the NO Clip (singleplayer) cheat ( i think ) was on. so nobody could kill me and i could just fly around the map and kill everybody.. Just thought id let you know incase you wanted to fix that , But thanks anyway

  8. #8
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    Thanks clay for the update. This sounds like the player_fps bug... I wonder if the 2 are somehow related?

  9. #9
    Banned
    Join Date
    May 2010
    Location
    fuck off?
    Posts
    1,145

    Default

    no, obiously it was because FT respawned him, it doesnt know to exit the script, so the script still was running, and so was FT respawning him,.


    either A, make special cases for FT, B, don't use FT and speccy, or C, make it generic, if the player gets respawned (detected needed), then exit the script.

  10. #10
    Banned
    Join Date
    May 2010
    Location
    fuck off?
    Posts
    1,145

    Default

    This could be extended and made a lot more advanced, feature rich, with better viewing modes, finding where the player is looking, going to where he is looking...drawing other players on your screen in 2D using hud prints. (could be funt o do). and so on...

    though these scripts have been around for..ever...and admins love them..no offence anyone, I can not understand why they are so popular..well I can, I just disagree. but in a wya, its good, because I fucking hated being kicked for cheating, I never ever used a cheat,. maybe if they specced, but then when I was an admin...I WOULD NOT want to waste my time "observing" a player. they were either obviously cheating, aimbots, or..they were a good challenge,...wallhacks are good challenges,...nothing more....aimbots are a little harder, but can be tricked...clever aimbotters are annoying..ha

    ANYWAY that's my 2 sense..but if it helps people out, ill help you guys out. but RR said he might look in to it...I would rather he spent his time blocking the cheats so this sort of thing is not needed and we have less whining (a massive reason I implemented the chat filter...actually the main reason).

    /rant over, sorry guys....maybe ill make it more advanced and fun, for fun, one day...


    and add FT and obj support...but admins...the same reason I hate punishment mods and do NOT condone them, if because it RUINS players fun and too much power for too many people. ....I can hardly find a server anymore...which is why I stopped playing...not becasue of cheats...but annoying admins and annoying "fast run give all weapon" mods.
    BRING ON CLIENT PATCH! and normal servers.

    oki rant actually over.....I will ask what I started off thinking about now.... features....because I would prefer if people are going to try and be more careful of kicking players, that they have as much tools to make a proper choice.

    with current scripting abilities....would only be possible to draw a players name (string)...over the head on a 2d surface of where a player is. on an admins screen.



    RR actually one thing I have always wanted to know if you ever get time, find out what println3d does.....

Posting Permissions

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