[CS:S/CSGO] Zombie
-
- Senior Member
- Posts: 309
- Joined: Sun May 17, 2020 7:56 am
- Location: Finland
- Contact:
[CS:S/CSGO] Zombie
https://github.com/srpg/Zombie
This plugin choose random player to infect to zombie, when you are infected to zombie, you need to infect other players to zombie to win the game.
Huge thanks to Kami, helping me with code and made the code working.
Edit:
Added csgo support, thought no tested at all
This plugin choose random player to infect to zombie, when you are infected to zombie, you need to infect other players to zombie to win the game.
Huge thanks to Kami, helping me with code and made the code working.
Edit:
Added csgo support, thought no tested at all
Last edited by cssbestrpg on Sun Jan 31, 2021 5:15 pm, edited 1 time in total.
Re: [Cs:s] Zombie
Hey :) Maybe you should try and add some more features (you could look at the popular SM zombie mods for inspiration). RIght now this seems more like a prototype or backbone for a potential Zombie plugin.
-
- Senior Member
- Posts: 309
- Joined: Sun May 17, 2020 7:56 am
- Location: Finland
- Contact:
Re: [Cs:s] Zombie
I will add more features, like !ztele and more stuff
-
- Senior Member
- Posts: 309
- Joined: Sun May 17, 2020 7:56 am
- Location: Finland
- Contact:
Re: [Cs:s] Zombie
Updated:
- Added now market, when type market opens a menu
- Added players have 12000cash everytime when spawn
- Added now market, when type market opens a menu
- Added players have 12000cash everytime when spawn
-
- Senior Member
- Posts: 309
- Joined: Sun May 17, 2020 7:56 am
- Location: Finland
- Contact:
Re: [Cs:s] Zombie
Updated:
- Added gain full hp, when kill zombie
- Added zombie death makes them back to human when respawns
- Added gain full hp, when kill zombie
- Added zombie death makes them back to human when respawns
-
- Senior Member
- Posts: 309
- Joined: Sun May 17, 2020 7:56 am
- Location: Finland
- Contact:
Re: [Cs:s] Zombie
Updated:
- Added !ztele to teleport yourself to spawn
- Added message, when buy weapon
- Added check is player alive and not being t for market use
- Added check is alive for ztele
- Added !ztele to teleport yourself to spawn
- Added message, when buy weapon
- Added check is player alive and not being t for market use
- Added check is alive for ztele
-
- Senior Member
- Posts: 309
- Joined: Sun May 17, 2020 7:56 am
- Location: Finland
- Contact:
Re: [Cs:s] Zombie
Update:
- Added hegrenade hit set zombie on fire 10seconds
- Added hegrenade hit set zombie on fire 10seconds
-
- Senior Member
- Posts: 309
- Joined: Sun May 17, 2020 7:56 am
- Location: Finland
- Contact:
Re: [Cs:s] Zombie
Update:
- After first infect, players get m4a1 and deagle, armor + helmet
- Fixed not able use weapons after first round
- Fixed having incorrect price text, when buy from market
- Added when get infected to zombie, weapon get removed(should prevent weapons drop on floor)
- Fixed zombie not respawn after death
- Added when weapon is compelity out of bullets/ammo, it get automatically removed
- Added infect sound, when get infected
- Fixed bug when you are ct and you knife zombie, it keep getting infected(again)
- After first infect, players get m4a1 and deagle, armor + helmet
- Fixed not able use weapons after first round
- Fixed having incorrect price text, when buy from market
- Added when get infected to zombie, weapon get removed(should prevent weapons drop on floor)
- Fixed zombie not respawn after death
- Added when weapon is compelity out of bullets/ammo, it get automatically removed
- Added infect sound, when get infected
- Fixed bug when you are ct and you knife zombie, it keep getting infected(again)
Last edited by cssbestrpg on Fri Dec 25, 2020 10:27 am, edited 1 time in total.
-
- Senior Member
- Posts: 309
- Joined: Sun May 17, 2020 7:56 am
- Location: Finland
- Contact:
Re: [Cs:s] Zombie
Update:
- Fixed path warning
- Fixed losing weapons t team, before infect
- Added translations
- Fixed path warning
- Fixed losing weapons t team, before infect
- Added translations
-
- Senior Member
- Posts: 309
- Joined: Sun May 17, 2020 7:56 am
- Location: Finland
- Contact:
Re: [Cs:s] Zombie
Update:
- Added german translation
- Changed colors in translation
- Added configs
- Added first infected zombie is frozen 10seconds and no receive damage during of freeze
- Cleaned code
- Added german translation
- Changed colors in translation
- Added configs
- Added first infected zombie is frozen 10seconds and no receive damage during of freeze
- Cleaned code
-
- Senior Member
- Posts: 309
- Joined: Sun May 17, 2020 7:56 am
- Location: Finland
- Contact:
Re: [Cs:s] Zombie
Update:
- Added clan_tag support for new functions
- If have the clan_tag server uses it gives following features:
- Weapons back after losing weapons from running out ammo/bullets(Config chance to disable)
- Health boost per kill(Config chance to disable)
- Speed boost(only once)(Config chance to disable)
- Fixed not giving clan_tag member their functions
- Added messages for weapon restore
- Fixed incorrect type in clan_tag getting for message
- Added timer for first infect
- Added teleport back to spawn, when get first infect
- Added clan_tag support for new functions
- If have the clan_tag server uses it gives following features:
- Weapons back after losing weapons from running out ammo/bullets(Config chance to disable)
- Health boost per kill(Config chance to disable)
- Speed boost(only once)(Config chance to disable)
- Fixed not giving clan_tag member their functions
- Added messages for weapon restore
- Fixed incorrect type in clan_tag getting for message
- Added timer for first infect
- Added teleport back to spawn, when get first infect
-
- Senior Member
- Posts: 309
- Joined: Sun May 17, 2020 7:56 am
- Location: Finland
- Contact:
Re: [Cs:s] Zombie
Update:
- Added zprops
Coming soon:
- Messages for zprop use
- Credits for zprop
- Added zprops
Coming soon:
- Messages for zprop use
- Credits for zprop
-
- Senior Member
- Posts: 309
- Joined: Sun May 17, 2020 7:56 am
- Location: Finland
- Contact:
Re: [Cs:s] Zombie
Update:
- Added zprops messages
- Added credits prices for zprops
- Added show price of zprops
- Fixed not remove credits after zprop buy
- Added zprops messages
- Added credits prices for zprops
- Added show price of zprops
- Fixed not remove credits after zprop buy
-
- Senior Member
- Posts: 309
- Joined: Sun May 17, 2020 7:56 am
- Location: Finland
- Contact:
Re: [Cs:s] Zombie
Update:
- Added infinite bullets
- Added infinite bullets
Re: [Cs:s] Zombie
Hey, I saw you are instantiating the Player class quite often, but you are not reusing it. This is not how you are supposed to use classes in Python. So, I would like to give you a little hint. The good thing is that SP is caching the player classes, so misusing the Player class doesn't result in a very heavy performance impact. But your plugin will be faster and more readable if you are reusing the Player instances. Let me provide one example for your zombie.py. Your current code looks like this:
By reusing the Player instance it looks like this:
The Player class has many methods and attributes you can access. Some of them are documented on the Wiki:
http://wiki.sourcepython.com/developing ... yers._base
http://wiki.sourcepython.com/developing ... ies.entity
As for the colors we also have cross-game compatible constants:
https://github.com/Source-Python-Dev-Te ... aytext2.py
Syntax: Select all
@Event('player_spawn')
def player_spawn(args):
userid = args.get_int('userid')
Player(index_from_userid(userid)).gravity = 1 # Should restore old gravity
Player(index_from_userid(userid)).set_noblock(True)
Player(index_from_userid(userid)).cash = 12000
Player(index_from_userid(userid)).unrestrict_weapons(*weapons)
Game.send(index_from_userid(userid), green='\x04', default='\x07FFB300')
Market.send(index_from_userid(userid), green='\x04', default='\x07FFB300')
global location
location = Player(index_from_userid(userid)).origin
Syntax: Select all
@Event('player_spawn')
def player_spawn(event):
player = Player.from_userid(event['userid']) # Using get_int() is also fine. Just a personal preference :)
player.gravity = 1
player.set_noblock(True) # Alternatively: player.noblock = True
player.cash = 12000
player.unrestrict_weapons(*weapons)
Game.send(player.index, green='\x04', default='\x07FFB300')
Market.send(player.index, green='\x04', default='\x07FFB300')
global location
location = player.origin
The Player class has many methods and attributes you can access. Some of them are documented on the Wiki:
http://wiki.sourcepython.com/developing ... yers._base
http://wiki.sourcepython.com/developing ... ies.entity
As for the colors we also have cross-game compatible constants:
https://github.com/Source-Python-Dev-Te ... aytext2.py
-
- Senior Member
- Posts: 309
- Joined: Sun May 17, 2020 7:56 am
- Location: Finland
- Contact:
Re: [Cs:s] Zombie
Hi, thanks for hint. I have updated code to reuse Player class.
-
- Senior Member
- Posts: 309
- Joined: Sun May 17, 2020 7:56 am
- Location: Finland
- Contact:
Re: [CS:S/CSGO] Zombie
Update:
- Added csgo support(no tested)
- Added drop weapon when buy in market(use knife if not want get weapons dropped during a buy a weapon)
- Added csgo support(no tested)
- Added drop weapon when buy in market(use knife if not want get weapons dropped during a buy a weapon)
-
- Senior Member
- Posts: 309
- Joined: Sun May 17, 2020 7:56 am
- Location: Finland
- Contact:
Re: [CS:S/CSGO] Zombie
Update:
- Fixed issues in csgo models not working correctly(not enterily tested)
- Fixed issues in csgo models not working correctly(not enterily tested)
-
- Senior Member
- Posts: 309
- Joined: Sun May 17, 2020 7:56 am
- Location: Finland
- Contact:
Re: [CS:S/CSGO] Zombie
Update:
- Changed for clan members health their max health increases when kill, instead adding current health for clan members
- Added back import accidently removed
- Changed for clan members health their max health increases when kill, instead adding current health for clan members
- Added back import accidently removed
-
- Senior Member
- Posts: 309
- Joined: Sun May 17, 2020 7:56 am
- Location: Finland
- Contact:
Re: [CS:S/CSGO] Zombie
Update:
- Fixed zprop credits message after buy being wrong
- Fixed not removing players credits after zprop buy
- Fixed english mistypo in zprop buy
- Fixed zprop credits message after buy being wrong
- Fixed not removing players credits after zprop buy
- Fixed english mistypo in zprop buy
Who is online
Users browsing this forum: No registered users and 6 guests