Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Files for extended Server + Random-Scripts like sliding mapvote on Deathrun

  1. #1
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,010
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts

    Files for extended Server + Random-Scripts like sliding mapvote on Deathrun

    Hey all,

    here you can see the scripts used to add MySQL etc. to CoD2: http://killtube.org/downloads/cod2/e...rver/main/std/

    Also random-scripts included like mapvote.gsc and ad.gsc (even surf and bunnyhop, go and awake surf to life! )

    Functions:
    Code:
    - setVelocity, getVelocity, addVelocity (needed for the mods: portal, surf)
    - keyPressed-functions for left, right, forward, backward, leanleft, leanright, jump etc., (needed for: surf, doublejump made by IzNoGod)
    - blazing fast astar-implementation (needed for: zombots)
    - setAlive-function (needed for: zombots, so xmodels are damagable without damage-trigger... zombots in stockmaps)
    timescale 0.01

  2. The Following 2 Users Say Thank You to kung foo man For This Useful Post:

    EvoloZz (13th January 2013),serthy (13th January 2013)

  3. #2
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Very nice, I have been looking into some of the work. I would myself change this:

    PHP Code:
    CREATE TABLE IF NOT EXISTS `players` (
      `
    idint(10NOT NULL AUTO_INCREMENT,
      `
    uservarchar(32) DEFAULT NULL,
      `
    passvarchar(32) DEFAULT NULL,
      `
    moneyint(10) DEFAULT NULL,
      `
    xpint(10) DEFAULT NULL,
      `
    killsint(10) DEFAULT NULL,
      `
    headshotsint(10) DEFAULT NULL,
      `
    melee_killsint(10) DEFAULT NULL,
      `
    longest_killstreakint(10) DEFAULT NULL,
      
    PRIMARY KEY (`id`)
    ENGINE=MyISAM DEFAULT CHARSET=latin1
    to

    PHP Code:
    CREATE TABLE IF NOT EXISTS `players` (
      `
    idint(10NOT NULL AUTO_INCREMENT,
      `
    uservarchar(32) DEFAULT NULL,
      `
    passvarchar(32) DEFAULT NULL,
      `
    moneyint(10) DEFAULT 0,
      `
    xpint(10) DEFAULT 0,
      `
    killsint(10) DEFAULT 0,
      `
    headshotsint(10) DEFAULT 0,
      `
    melee_killsint(10) DEFAULT 0,
      `
    longest_killstreakint(10) DEFAULT 0,
      
    PRIMARY KEY (`id`)
    ENGINE=MyISAM DEFAULT CHARSET=latin1
    Now you don't need to set the value for money, xp etc.. Also you don't need to use the function IFNULL to check if the value is null. Like is done here:

    PHP Code:
    CREATE FUNCTION statsDeltaMoney (id_ INTmoney_ INT)
    RETURNS INT
    DETERMINISTIC
    BEGIN
        
    DECLARE ret INT;
        
    SET ret NULL;
        
    UPDATE players SET money=IFNULL(money,0)+money_ WHERE id id_;
        
    SELECT money FROM players WHERE id id_ INTO ret;
        RETURN 
    ret;
    END 

  4. The Following User Says Thank You to Mitch For This Useful Post:

    kung foo man (13th January 2013)

  5. #3
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,010
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Added:
    - std\utils::disableGlobalPlayerCollision();
    - std\utils::getType(arg);

    First function prevents player collision (used for: codjumper, zombots, surf...)

    Second function retrieves the type of an argument: std\utils::getType("test") == "STRING" (the function for for EVERY type)
    timescale 0.01

  6. #4
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,010
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Fixed the earlier disableGlobalPlayerCollision()-implementation (brushmodels didnt move the player anymore). Its working nice in CoD2 1.2/1.3 now.

    If somebody got ideas for new functions, please write them here.
    timescale 0.01

  7. #5
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    maybe (if you are very bored lol):

    - solidTrace( <startPos> , <endPos> , <innerBounds> , <outerBounds> , <hitPlayers> , <ignoredEnt> ) to check if there is something in that qubic-solid trace
    - setWeaponAnim( <anim> ) or playWeaponAnim( <anim> ) to play a reload etc. anim
    - stopFx( <fxEnt> ) to stop the effect immediately (now you have to wait till the effect dies on its own)
    - getClientCvar( <var> )
    - getArrayKeys( <array> ) keys = getArrayKeys( arr ); foreach( key ){ arr[key].....
    - playSoundToTeam( <alias> )
    - improved motions (moveTo()/rotateTo() are looking really "laggy" if the move/rotate too fast)
    - setMoveSpeedScale( <speedScale> )
    - rcon( <order> ) to exec rcon via script without execClientCmd-method
    - maybe apply some global flags/funcs on clients (speed/gravity/timescale/falldamage)
    - maybe some simple vehicles, or the ability to move entities on the ground (ground-detection)
    - in addition to that collission detection of entities with the worldgeometry
    - changeFontscaleOverTime( <time > ) & changeColorOverTime( <time > ) & changeAngleOverTime( <angle> ) for hud elements or improved setText() without the need of precaching
    - maybe some scoreboard tweaks
    - manipulate /writeconfig to write stats on the clients rig (but hey, u already got mysql... so no need for this)
    but for now, the most important one, setCanDamage(), you already implemented
    so, if you are bored, you can think about my suggestions j4f
    i dont know if there are even possible to implement...

  8. The Following User Says Thank You to serthy For This Useful Post:

    kung foo man (6th February 2013)

  9. #6
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    stopfx already works in normal cod:
    Code:
    fx = playfx(stuff goes here);
    wait 1;
    fx delete();
    Getclientcvar is impossible, is clientside, not serverside. Also opens the door for keystealers.

    Playsoundtoteam() should be easily achievable, as it is in sd.gsc already.

    Motions can be improved by upping sv_fps, which in turn causes timings to fuck up.

    ent-world geometry detection can be done by spawning a few trigger-radiusses on the outside of your ent, then check istouching() with worldspawn (getent("worldspawn", "targetname"))

    changeangleovertime() can be done using setclock(), but only in one direction. Is a clientside problem though, cant really be fixed. Until then, just manually call the functions again and again. Only works for images.


    +1-ing these suggestions:

    playweaponanim
    setmovespeedscale (+0.5 here, not really +1 as it is kinda achievable through weapons)
    rconcommand() should be very, very useful, especially if you can restart the server with it to get rid of bots. Or just add a proper kickbot() command. Hey, that shouldnt be too hard?
    global flags on client (speed, grav, falldamage, but NOT timescale (how would that even work?))


    Solidtrace() can sorta be replaced by some built-in function that uses the player's size to trace, but only returns the last origin a player can stand. (forgot function name)

  10. The Following User Says Thank You to IzNoGoD For This Useful Post:

    kung foo man (6th February 2013)

  11. #7
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Would it be possible to make a trace that gets the entity of a misc model? For example in a hide and seek mod you can clone the model you are looking at.

  12. #8
    Private First Class
    Join Date
    Dec 2012
    Posts
    127
    Thanks
    132
    Thanked 114 Times in 63 Posts
    kickbot() function sounds good, cause kicking bots after map restart is really annoying...

  13. #9
    Private First Class Earliboy's Avatar
    Join Date
    Nov 2012
    Location
    Germany
    Posts
    130
    Thanks
    5
    Thanked 88 Times in 61 Posts
    There is allready a way to get Bots out of the Server, I'm not able to say how, but its with rcon + sort of server restart
    No ... No ... this is not possible .......

  14. #10
    Private
    Join Date
    Jan 2013
    Location
    Hungary
    Posts
    113
    Thanks
    10
    Thanked 74 Times in 45 Posts
    Code:
    players = getEntArray("player", "classname");
    for (i = 0; i < players.size; i++)
    {
    	player = players[i];
    
    	if (getSubStr(player.name,0,3) == "bot" )
    		player kick();
    }

Posting Permissions

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