foresight 1.6 and 3rd person server

sgTsTuFz

Senior Member
Joined
Aug 30, 2004
Likes
7
Location
Coralville, Iowa
#2
Looks like you're out of luck. The maker of Foresight, Slider, disappeared 3 years ago before he could finish and release the client side of the 1.6 Foresight. What that means is Foresight will never be enabled to allow 3rd person gaming on a server that Foresight scans.

Go HERE and search for 3rd to see that Foresight is not compatible with 3rd person gaming.
 
Joined
Nov 15, 2010
Likes
0
#3
I opened the file zzzzzzzzzzzzz_Foresight160.pk3 and i open the foresight.scr

Code:
// Small Portions of this code has been borrowed from Delator, CI and other sources ... 
// No need to reinvent the wheel 
// If anyone has a problem with it please let me know and I will remove it.
main:
if (int(getcvar(FST_shotnum)) == 0) setcvar "FST_shotnum" 0
if (int(getcvar(FST_loaded)) == 0)
{
    waitexec foresight.cfg
    setcvar "FST_loaded" 1
}
level.maxclients = Int(getcvar(sv_maxclients))
level.cineloopinterval = 0
level.balanceActive = 0
level.FST_functions = "global/FST_functions.scr"
level.FST_sshots = "global/FST_sshots.scr"
level.FST_weaplimit = "global/FST_weaplimit.scr"
level.FST_messages = "global/FST_messages.scr"
//level.FST_scores = "global/FST_score.scr"
thread level.FST_functions::removeMG42

if (level.v4 != 1)
{
    level waittill spawn
    thread t1
    end
}
end

t1:
    if (level.v4 != 1)
    {
        level.v4 = 1
    }
    else
        end
    setcvar "FST_Ver" "1.6"
    setcvar "FST_Rev" ".0"
    huddraw_string 200 " "
    local.mapname = getcvar(mapname)
    if (getcvar(FST_oldMap) != local.mapname)
    {
        //thread level.FST_scores::scoreset

        setcvar "FST_oldMap" local.mapname
        //setcvar ("FST_playerKillsOld") (getcvar "FST_playerKills")
        //setcvar ("FST_playerDeathsOld") (getcvar "FST_playerDeaths")
        //for (local.p=0;local.p<=(level.maxclients-1);local.p++)
        //{
        //    game.FST_score[local.p] = 0
        //    game.FST_deaths[local.p] = 0
        //}

    }
    thread mainloop
end

mainloop:
    // get all cvars once per loop...
    level.FST_Action = (getcvar(FST_Action))
    level.FST_shotnum = (getcvar(FST_shotnum))
    
    waitthread teamtotals

    if ($player != NULL)
    {
    for (local.p=1;local.p<=level.maxclients;local.p++)
    {
        //thread level.FST_scores::scoresetup local.p
        waitthread forcedumpvars local.p
        waitthread dmteammark local.p
        waitthread dropspecs local.p
        if (level.FST_Action != "")
        {
            waitthread level.FST_functions::splitstringthread level.FST_Action
            waitthread actiononplayerthread local.p
        }
    }
    }
    wait 1.0
    waitframe
    
    thread level.FST_messages::msgticker
    thread level.FST_functions::stampFST
    thread nocine
    thread specmode
    //thread level.FST_scores::scoreset
    
    if (getcvar(FST_Clientban) == "0")
    {
        setcvar "FST_Clientban" ""
    }

    if (getcvar(FST_Clientbanday) == "0")
    {
        setcvar "FST_Clientbanday" ""
    }

    if ((getcvar(FST_TeamBalance) == "1") && (level.balanceActive != 1))
    {
        level.balanceActive = 1
        thread level.FST_functions::balanceteam
    }
    thread collectCvars
    goto mainloop
end


actiononplayerthread local.p:
//read Cvars
local.playerNumber = int ( level.tmpString1 )
local.playerAction = level.tmpString2
local.playerMisc = level.tmpString3
if (local.p>$player.size)
    end
if ($player[local.p]!=NULL)
{
    local.currplayer13 = $player[local.p]

    if ((local.currplayer13.entnum == local.playerNumber) || (local.playerNumber == 999))
    {
        switch (local.playerAction)
        {
            case followme:
                /*
                for (local.f=1;local.f<=level.maxclients;local.f++)
                {
                    local.watchplayer = $player[local.f]
                    if (local.watchplayer.entnum == local.playermisc)
                    {
                        thread level.FST_functions::track local.currplayer13 local.watchplayer
                    }
                }
                */
            break
            case spy:
                thread level.FST_functions::setupSpy local.p
            break
            case spectator:
                local.currplayer13 spectator
            break
            case burn:
                thread level.FST_functions::clientburn local.p
            break
            case bomb:
                thread level.FST_functions::clientbomb local.p
            break
            case morph:
                thread level.FST_functions::clientmorph local.p local.playerMisc
            break
            case suicide:
                killent local.currplayer13.entnum
            break
            case swap:
            switch (local.currplayer13.dmteam)
            {
                case axis:
                local.currplayer13 spectator
                local.currplayer13 join_team "allies"
                local.currplayer13 iprint ("You have been forced to ALLIES") 1
                break
                case allies:
                local.currplayer13 spectator
                local.currplayer13 join_team "axis"
                local.currplayer13 iprint ("You have been forced to AXIS") 1
                break
                default:
                break
            }
            break
            case allies:
            switch (local.currplayer13.dmteam)
            {
                case axis:
                local.currplayer13 spectator
                local.currplayer13 join_team "allies"
                local.currplayer13 iprint ("You have been forced to ALLIES") 1
                break
                case allies:
                break
                default:
                break
            }
            break
            case axis:
            switch (local.currplayer13.dmteam)
            {
                case axis:
                break
                case allies:
                local.currplayer13 spectator
                local.currplayer13 join_team "axis"
                local.currplayer13 iprint ("You have been forced to AXIS") 1
                break
                default:
                break
            }
            break
            case forcevars:
            {
                thread forcedumpvars local.p
            }
            break
            case message:
            {
                waitframe
                local.currplayer13 iprint (local.playerMisc) 1
            }
            break
            case forcemodelson:
            {
                waitframe
                local.currplayer13 stufftext ("setu cg_forcemodel 1")
            }
            break
            case forcemodelsoff:
            {
                waitframe
                local.currplayer13 stufftext ("setu cg_forcemodel 0")
            }
            break
            case takeweaps:
                local.currplayer13 takeall
            break
            case forcerifle:
                local.currplayer13 primarydmweapon rifle
                local.currplayer13 respawn
                local.currplayer13 iprint ("You have been forced to use a Rifle") 1
            break
            case forcesniper:
                local.currplayer13 primarydmweapon sniper
                local.currplayer13 respawn
                local.currplayer13 iprint ("You have been forced to use a Sniper") 1
            break
            case forcesmg:
                local.currplayer13 primarydmweapon smg
                local.currplayer13 respawn
                local.currplayer13 iprint ("You have been forced to use a SMG") 1
            break
            case forcemg:
                local.currplayer13 primarydmweapon mg
                local.currplayer13 respawn
                local.currplayer13 iprint ("You have been forced to use a MG") 1
            break
            case forcerocket:
                local.currplayer13 primarydmweapon heavy
                local.currplayer13 respawn
                local.currplayer13 iprint ("You have been forced to use a Rocket") 1
            break
            case ss_action:
                waitthread level.FST_sshots::ssaction local.currplayer13
                thread level.FST_sshots::ssnotify local.currplayer13
                local.playerAction = ""
            break
            case ss_scores:
                waitthread level.FST_sshots::ssscores local.currplayer13
                thread level.FST_sshots::ssnotify local.currplayer13
                local.playerAction = ""
            break
            case ss_models:
                waitthread level.FST_sshots::ssmodels local.currplayer13
                thread level.FST_sshots::ssnotify local.currplayer13
            break
            case ss_all:
                //waitthread level.FST_sshots::ssconsole local.currplayer13
                //waitthread level.FST_sshots::ssdir1 local.currplayer13
                //waitthread level.FST_sshots::ssdir2 local.currplayer13
                //waitthread level.FST_sshots::ssdir3 local.currplayer13
                //waitthread level.FST_sshots::sspk3 local.currplayer13
                //waitthread level.FST_sshots::sspath local.currplayer13
                //waitthread level.FST_sshots::ssbindl local.currplayer13
                //waitthread level.FST_sshots::ssconsole local.currplayer13
                waitthread level.FST_sshots::ssaction local.currplayer13
                waitthread level.FST_sshots::ssscores local.currplayer13
                waitthread level.FST_sshots::ssmodels local.currplayer13
                thread level.FST_sshots::ssnotify local.currplayer13
            break
            case frozen:
                local.currplayer13 physics_off
                wait 0.3
                local.currplayer13 iprint ("You have been frozen by the Admin to get your attention.") 1
            break
            case thawed:
                local.currplayer13 physics_on
                wait 0.3
                local.currplayer13 iprint ("Thank you for your cooperation.") 1
            break
            case clientban:
                if (local.playerNumber != 999)
                {
                local.tmpban = (getcvar(FST_Clientban))
                local.tmpbannew = ((local.playerNumber) + "|" + (local.playerMisc))
                if (local.tmpban == "")
                {
                    setcvar "FST_Clientban" (local.tmpbannew)
                }
                else
                {
                    setcvar "FST_Clientban" ((local.tmpban) + ";" + (local.tmpbannew))
                }
                wait 0.3
                local.currplayer13 spectator
                wait 0.3
                local.tmpstr1 = ("set com_errormessage You have been BANNED for " + (local.playerMisc))
                local.currplayer13 stufftext local.tmpstr1
                local.currplayer13 stufftext ("togglemenu errormessage")
                //local.currplayer13 iprint ("You have been BANNED for " + (local.playerMisc)) 1
                }
            break
            case clientbanday:
                if (local.playerNumber != 999)
                {
                local.tmpban = (getcvar(FST_Clientbanday))
                local.tmpbannew = ((local.playerNumber) + "|" + (local.playerMisc))
                if (local.tmpban == "")
                {
                    setcvar "FST_Clientbanday" (local.tmpbannew)
                }
                else
                {
                    setcvar "FST_Clientbanday" ((local.tmpban) + ";" + (local.tmpbannew))
                }
                wait 0.3
                local.currplayer13 spectator
                wait 0.3
                local.tmpstr1 = ("set com_errormessage You have been BANNED 1 Day for " + (local.playerMisc))
                local.currplayer13 stufftext local.tmpstr1
                local.currplayer13 stufftext ("togglemenu errormessage")
                //local.currplayer13 iprint ("You have been BANNED for 1 Day for " + (local.playerMisc)) 1
                }
            break
            case noclient:
                wait 0.3
                local.currplayer13 spectator
                wait 0.3
                local.tmpstr1 = ("set com_errormessage Get Foresight Client at www.rconforesight.net")
                local.currplayer13 stufftext local.tmpstr1
                local.currplayer13 stufftext ("togglemenu errormessage")
                local.currplayer13 stufftext ("widgetcommand message font verdana-12")
                local.currplayer13 stufftext ("disconnect")
            break
            case shutdown:
            if (local.playerNumber != 999)
            {
                local.currplayer13 stufftext ("quit;qu1t")
            }
            break
            case namechange:
            if (local.playerNumber != 999)
            {
                local.currplayer13 stufftext ("name " + (local.playerMisc))                    
            }
            break
            default:
                local.currplayer13 stufftext (local.playerAction)
            break
        }
    wait 0.3
    waitframe
    }
}
setcvar "FST_Action" ""
local.playerNumber = ""
local.playerAction = ""
local.playerMisc = ""
end

forcedumpvars local.p:
    if (local.p>$player.size)
        end

    if ($player[local.p]==NULL)
        end
    local.p13 = $player[local.p]
    if (local.p13.forcedvars != 1)
    {
        waitframe
        local.p13 stufftext ("set config foresight.cfg")
        wait 0.3
        local.p13 stufftext ("alias reloadmap say I'm trying to restart the server! KICK ME! KICK ME!")
        wait 0.3
        local.p13 stufftext ("alias r_loadmap say I'm trying to restart the server! KICK ME! KICK ME!")
        wait 0.3
        local.p13 stufftext ("alias screenshot say I have been caught with a hacked SS;_lias screenshot say I have been caught with a hacked SS")
        wait 0.3
        local.p13 stufftext ("alias leave_team echo")
        wait 0.3
        local.p13 stufftext ("set snaps 19")
        wait 0.3
        local.p13 stufftext ("setu version 0")
        if (getcvar(FST_DetectGFXCVARS) == 1)
        {
            wait 0.3
            local.p13 stufftext ("setu r_lodviewmodelcap .55;setu r_lodcap .5;setu r_lodscale .55")
        }
        if (getcvar(FST_nocinematic) == 1)
        {
            wait 0.3
            local.p13 stufftext ("setu s_ambientvolume 1")
        }        
        wait 0.3
        local.p13 stufftext ("setu cg_3rd_person 0[COLOR=Red]<------- this remove??[/COLOR];setu cg_f0rc3m0d3l 0;setu ib_wallhack 0;setu ib_doshoot 0;setu ib_doaim 0;setu ib_esp 0;setu ib_hud 0;setu r_light_nolight 0;setu r_showSmp 0")
        wait 0.3
        local.p13 stufftext ("setu r_farplane 0;setu r_farplane_nocull 0;setu r_farplane_nofog 0;setu r_novis 0;setu r_lightmap 0;setu r_fullbright 0;setu r_vertexlight 0;setu r_mapOverBrightBits 1")
        wait 0.3
        local.p13 stufftext ("setu r_picmip 0;setu r_light_showgrid 0;setu r_overbrightbits 0;setu r_showsky 0;setu r_nobind 0;setu r_showcull 0;setu r_singleshader 0")
        wait 0.3
        local.p13 stufftext ("setu cg_te_dietouch 0;setu g_showbullettrace 0;setu dis4_chams 0;setu r_picmap 0;setu r_p1cm1p 0;setu r_p1cmap 0")
        wait 0.3
        local.p13 stufftext ("setu as_forcemodel 0;setu cg_3rd_perzon 0;setu cg_force****a 0;setu xx_forcemodel 0;setu xx_3rd_person 0")
        wait 0.3
        local.p13 stufftext ("setu e_Zoom 0;setu e_Chams 0;setu e_WESP 0;setu e_Glow 0;setu e_NoFog 0;setu e_TriggerBot 0;setu e_WireChams 0;setu e_TriESP 0")
        wait 0.3
        local.p13 stufftext ("setu r_fastksy 0;setu r_l1ghtm4p 0;setu r_f4rpl4n3_n0f0g 0;setu cg_3rd_p3rson 0;setu cg_c4meraverticaldisplacement 0;setu wbot 0")
        wait 0.3
        local.p13 stufftext ("alias " + getcvar(FST_Varcontrol) + " setu " + getcvar(FST_Varcontrol) + " " + getcvar(FST_Varcontrol))
        wait 0.3
        local.p13 stufftext (getcvar(FST_Varcontrol))
        wait 0.3
        local.p13 stufftext ("set config unnamedsoldier.cfg")
        wait 0.3
        local.p13 stufftext ("set snaps 20")
        local.p13.forcedvars = 1
    }
end

teamtotals:
    if (getcvar(g_gametype) != "0")
    {
    level.axis = 0
    level.allies = 0
    level.spectator = 0

    for(local.i = 1; local.i < $player.size+1;local.i++)
    {
    if($player[local.i].dmteam == "axis")
        level.axis++
    if($player[local.i].dmteam == "allies")
        level.allies++
    if($player[local.i].dmteam == "spectator")
        level.spectator++
    }
    }
end

dmteammark local.p:
    if (local.p>$player.size)
        end

    if ($player[local.p]==NIL)
    {
        println ("=========== dmteammark player is NIL " + local.p)
        game.joinTime[local.p] = 0
        end
    }
    local.player = $player[local.p]
    local.player.wasSwapped = 0
    if (local.player.scoreSet != 1)
    {
        game.FST_score[local.player.entnum] = 0
        game.FST_deaths[local.player.entnum] = 0
        local.player.scoreSet = 1
    }
    if (local.player.joinSet != 1)
    {
        game.joinTime[local.player.entnum] = level.time
        local.player.joinSet = 1
    }
    local.player stufftext ("setu FST_dmTeam " + local.player.dmteam)
    if ((getcvar(FST_forcemodel) == "0") || (getcvar(FST_forcemodel) == "1"))
    {
        local.player stufftext ("setu cg_forcemodel " + getcvar(FST_forcemodel))    
    }
    if (local.player.dmteam != "spectator")
    {
        local.player.specwarn = 0
    }
end

nocine:
    level.ceneloopmax = 60
    level.cineloopinterval++
    if (level.cineloopinterval >= level.ceneloopmax)
    {
        if (($player != NULL) && (getcvar(FST_nocinematic)=="1"))
        {
            level.ambient_script_run = 0
            exec global/ambient.scr
        }
        level.cineloopinterval = 0
    }
end

specmode:
    if ((getcvar(FST_Spec1st) == "1") && (level.specState != 1))
    {
        setcvar "g_spectatefollow_pitch" "-2"
        setcvar "g_spectatefollow_up" "2"
        setcvar "g_spectatefollow_forward" "40"
        setcvar "g_spectatefollow_right" "3"
        level.specState = 1        
    }
    if ((getcvar(FST_Spec1st) == "0") && (level.specState != 0))
    {
        setcvar "g_spectatefollow_pitch" "2"
        setcvar "g_spectatefollow_up" "24" //10
        setcvar "g_spectatefollow_forward" "-56" //20
        setcvar "g_spectatefollow_right" "0" //3
        level.specState = 0
    }
end

dropspecs local.p:
    if (local.p>$player.size)
        end

    if ($player[local.p]==NULL)
        end
    local.player = $player[local.p]

    if ((getcvar(FST_SpecMode) == "1") && (local.player.dmteam == "spectator"))
    {
        if (local.player.specwarn == NIL)
        {
            local.player.specwarn = 0
        }
        if (local.player.specwarn >= int(getcvar(FST_SpecWarn)))
        {
            local.player stufftext ("disconnect")
        }
        else
        {
            local.player.specwarn++
            local.player iprint ("                           ") 1
            local.player iprint ("***************************") 1
            local.player iprint ("* Spectate is not allowed *") 1
            local.player iprint ("*  Choose or be kicked!!! *") 1
            local.player iprint ("***************************") 1
            wait 5
        }
    }
    if ((getcvar(FST_SpecMode) == "2") && (local.player.dmteam == "spectator"))
    {
        if(level.axis >= level.allies)
        {
            local.player join_team "allies"
            wait 1
            local.player iprint ("You have been forced to ALLIES") 1
        }
        else
        {
            local.player join_team "axis"
            wait 1
            local.player iprint ("You have been forced to AXIS") 1
        }    
    }
end

collectCvars:
    if (level.cvarsWait != 1)
    {
    level.cvarsWait = 1
    local.tmpcvars = ("FST_ClanTag:" + getcvar(FST_ClanTag) + ";FST_ClanSide:" + getcvar(FST_ClanSide) + ";FST_ClanSwap:" + getcvar(FST_ClanSwap) + ";FST_Clientban:" + getcvar(FST_Clientban) + ";FST_Clientbanday:" + getcvar(FST_Clientbanday) + ";FST_forcemodel:" + getcvar(FST_forcemodel) + ";FST_LameName:" + getcvar(FST_LameName) + ";FST_nocinematic:" + getcvar(FST_nocinematic) + ";FST_TeamBalance:" + getcvar(FST_TeamBalance) + ";FST_TeamBalanceDiff:" + getcvar(FST_TeamBalanceDiff) + ";FST_weapLimit:" + getcvar(FST_weapLimit) + ";FST_weapRifle:" + getcvar(FST_weapRifle) + ";FST_weapSniper:" + getcvar(FST_weapSniper) + ";FST_weapSMG:" + getcvar(FST_weapSMG) + ";FST_weapMG:" + getcvar(FST_weapMG) + ";FST_weapSmoke:" + getcvar(FST_weapSmoke) + ";FST_weapSpecial:" + getcvar(FST_weapSpecial) + ";FST_weapPistol:" + getcvar(FST_weapPistol) + ";FST_weapNade:" + getcvar(FST_weapNade) + ";FST_weapRocket:" + getcvar(FST_weapRocket) + ";FST_Spec1st:" + getcvar(FST_Spec1st) + ";FST_SpecMode:" + getcvar(FST_SpecMode) + ";FST_SpecWarn:" + getcvar(FST_SpecWarn) + ";FST_DetectGFXCVARS:" + getcvar(FST_DetectGFXCVARS) + ";FST_AdvSS:" + getcvar(FST_AdvSS) )
    setcvar "FST_CVARS" local.tmpcvars
    // timer section
    setcvar "sv_time" level.time
    wait 15
    level.cvarsWait = 0
    }
end
if you erase the commands I have marked with red will change anything????
 
Last edited:

sgTsTuFz

Senior Member
Joined
Aug 30, 2004
Likes
7
Location
Coralville, Iowa
#6
yah, and if you read it all the way thru, it did NOT work. again, read my links, one of them tells you that you cannot edit the pk3 and make foresight NOT scan for 3rd person and kick.
 
Top Bottom