Raised This Month: $51 Target: $400
 12% 

[ZPS] Zombie Lives Multiplier


Post New Thread Reply   
 
Thread Tools Display Modes
Author
will2tango
Member
Join Date: Nov 2009
Location: England
Plugin ID:
1521
Plugin Version:
1.0
Plugin Category:
General Purpose
Plugin Game:
Zombie Panic!
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Set zombie respawns to a multiplier of players in game
    Old 03-13-2010 , 11:38   [ZPS] Zombie Lives Multiplier
    Reply With Quote #1

    ZPS has a CVAR to allow you to set the amount of zombie respawns, but this is a static value, if set to 12 zombies will have 12 respawns no matter how many players are on each team. This plugin dynamically sets this value depending on how many players are in game.

    CVARs:
    sm_zombolives_version - current version
    sm_zombolives_multi - Changes the Multiplier of Zombie Lives. (default & disabled = 2)

    Comments:
    This plugin literally counts how many players spawn, takes one away (for the carrier) then multiplies that number by the multiplier and sets zombie respawns to this value.

    To use set the multiplier add sm_zombo_lives_multi "multiplier" to your server.cfg file. eg.
    sm_zombolives_multi "5"

    Limitations:
    You can only set zombie respawns on a ZPS map.
    As this counts players in game it will unfortunately count idle players who have not joined a team.
    I have also allowed the game to handle the first round its self as no players in game immediately after a map change.

    To do:
    Improve code, ie use GetTeamClientCount rather than GetClientCount then take away one.

    Change Log:
    1.0 - Initial Release
    2.0 - Zombie Lives set on Player Spawn rather than PlayerCount on RoundEnd.
    2.1 - Reomved Testing PrintToChats
    Attached Files
    File Type: sp Get Plugin or Get Source (zombolivesmultiplier.sp - 1050 views - 3.1 KB)

    Last edited by will2tango; 08-28-2010 at 07:40. Reason: Corrected CVAR (thanx Fenrix)
    will2tango is offline
    Sammy-ROCK!
    Senior Member
    Join Date: Jun 2008
    Location: Near Mrs.Lag
    Old 03-13-2010 , 11:50   Re: [ZPS] Zombie Lives Multiplier
    Reply With Quote #2

    What's wrong with GetTeamClientCount()?
    Sammy-ROCK! is offline
    will2tango
    Member
    Join Date: Nov 2009
    Location: England
    Old 03-13-2010 , 11:59   Re: [ZPS] Zombie Lives Multiplier
    Reply With Quote #3

    lol ive never used that one (did not know it existed! that will really help me on another plugin) Thanks very much Sammy, still learning!
    This fires on "game_round_restart" would that cause any problems with GetTeamClientCount()?
    Also I dont supose you know of a better time to fire this by any chance? I dont like it fireing as a round ends as players could leave before the next round kicks off
    Thanks Sammy!

    -Edit: Thanks Sammy, got there in the end, thanks for your guidance

    Last edited by will2tango; 06-18-2010 at 13:01. Reason: update
    will2tango is offline
    Fenrix
    Member
    Join Date: Mar 2008
    Old 08-27-2010 , 12:24   Re: [ZPS] Zombie Lives Multiplier
    Reply With Quote #4

    typo in your listed commands in opening post.

    should be sm_zombolives_multi

    have not tested it yet, had to get it working first
    Fenrix is offline
    will2tango
    Member
    Join Date: Nov 2009
    Location: England
    Old 08-28-2010 , 07:39   Re: [ZPS] Zombie Lives Multiplier
    Reply With Quote #5

    Sorry Fenrix, may bad! Thank you for pointing that out for me
    Any more troubles with let me know
    __________________
    will2tango is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 04:32.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode