[CS:S/CSGO] Zombie

Release your plugins here!
cssbestrpg
Senior Member
Posts: 287
Joined: Sun May 17, 2020 7:56 am
Location: Finland
Contact:

[CS:S/CSGO] Zombie

Postby cssbestrpg » Mon Dec 21, 2020 7:13 pm

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
Last edited by cssbestrpg on Sun Jan 31, 2021 5:15 pm, edited 1 time in total.
User avatar
Kami
Global Moderator
Posts: 263
Joined: Wed Aug 15, 2012 1:24 am
Location: Germany

Re: [Cs:s] Zombie

Postby Kami » Mon Dec 21, 2020 7:49 pm

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.
cssbestrpg
Senior Member
Posts: 287
Joined: Sun May 17, 2020 7:56 am
Location: Finland
Contact:

Re: [Cs:s] Zombie

Postby cssbestrpg » Mon Dec 21, 2020 7:51 pm

I will add more features, like !ztele and more stuff
cssbestrpg
Senior Member
Posts: 287
Joined: Sun May 17, 2020 7:56 am
Location: Finland
Contact:

Re: [Cs:s] Zombie

Postby cssbestrpg » Mon Dec 21, 2020 9:23 pm

Updated:
- Added now market, when type market opens a menu
- Added players have 12000cash everytime when spawn
cssbestrpg
Senior Member
Posts: 287
Joined: Sun May 17, 2020 7:56 am
Location: Finland
Contact:

Re: [Cs:s] Zombie

Postby cssbestrpg » Mon Dec 21, 2020 10:04 pm

Updated:
- Added gain full hp, when kill zombie
- Added zombie death makes them back to human when respawns
cssbestrpg
Senior Member
Posts: 287
Joined: Sun May 17, 2020 7:56 am
Location: Finland
Contact:

Re: [Cs:s] Zombie

Postby cssbestrpg » Tue Dec 22, 2020 6:25 am

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
cssbestrpg
Senior Member
Posts: 287
Joined: Sun May 17, 2020 7:56 am
Location: Finland
Contact:

Re: [Cs:s] Zombie

Postby cssbestrpg » Tue Dec 22, 2020 8:09 am

Update:
- Added hegrenade hit set zombie on fire 10seconds
cssbestrpg
Senior Member
Posts: 287
Joined: Sun May 17, 2020 7:56 am
Location: Finland
Contact:

Re: [Cs:s] Zombie

Postby cssbestrpg » Tue Dec 22, 2020 8:38 am

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)
Last edited by cssbestrpg on Fri Dec 25, 2020 10:27 am, edited 1 time in total.
cssbestrpg
Senior Member
Posts: 287
Joined: Sun May 17, 2020 7:56 am
Location: Finland
Contact:

Re: [Cs:s] Zombie

Postby cssbestrpg » Thu Dec 24, 2020 4:50 pm

Update:
- Fixed path warning
- Fixed losing weapons t team, before infect
- Added translations
cssbestrpg
Senior Member
Posts: 287
Joined: Sun May 17, 2020 7:56 am
Location: Finland
Contact:

Re: [Cs:s] Zombie

Postby cssbestrpg » Sun Jan 10, 2021 12:26 pm

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
cssbestrpg
Senior Member
Posts: 287
Joined: Sun May 17, 2020 7:56 am
Location: Finland
Contact:

Re: [Cs:s] Zombie

Postby cssbestrpg » Thu Jan 14, 2021 5:03 pm

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
cssbestrpg
Senior Member
Posts: 287
Joined: Sun May 17, 2020 7:56 am
Location: Finland
Contact:

Re: [Cs:s] Zombie

Postby cssbestrpg » Fri Jan 15, 2021 5:01 pm

Update:
- Added zprops

Coming soon:
- Messages for zprop use
- Credits for zprop
cssbestrpg
Senior Member
Posts: 287
Joined: Sun May 17, 2020 7:56 am
Location: Finland
Contact:

Re: [Cs:s] Zombie

Postby cssbestrpg » Sat Jan 16, 2021 12:23 pm

Update:
- Added zprops messages
- Added credits prices for zprops
- Added show price of zprops
- Fixed not remove credits after zprop buy
cssbestrpg
Senior Member
Posts: 287
Joined: Sun May 17, 2020 7:56 am
Location: Finland
Contact:

Re: [Cs:s] Zombie

Postby cssbestrpg » Wed Jan 27, 2021 6:37 pm

Update:
- Added infinite bullets
User avatar
Ayuto
Project Leader
Posts: 2193
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: [Cs:s] Zombie

Postby Ayuto » Sat Jan 30, 2021 10:38 am

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:

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
By reusing the Player instance it looks like this:

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
cssbestrpg
Senior Member
Posts: 287
Joined: Sun May 17, 2020 7:56 am
Location: Finland
Contact:

Re: [Cs:s] Zombie

Postby cssbestrpg » Sat Jan 30, 2021 5:00 pm

Hi, thanks for hint. I have updated code to reuse Player class.
cssbestrpg
Senior Member
Posts: 287
Joined: Sun May 17, 2020 7:56 am
Location: Finland
Contact:

Re: [CS:S/CSGO] Zombie

Postby cssbestrpg » Sun Jan 31, 2021 5:17 pm

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)
cssbestrpg
Senior Member
Posts: 287
Joined: Sun May 17, 2020 7:56 am
Location: Finland
Contact:

Re: [CS:S/CSGO] Zombie

Postby cssbestrpg » Tue Feb 02, 2021 7:12 pm

Update:
- Fixed issues in csgo models not working correctly(not enterily tested)
cssbestrpg
Senior Member
Posts: 287
Joined: Sun May 17, 2020 7:56 am
Location: Finland
Contact:

Re: [CS:S/CSGO] Zombie

Postby cssbestrpg » Tue Feb 16, 2021 2:44 pm

Update:
- Changed for clan members health their max health increases when kill, instead adding current health for clan members
- Added back import accidently removed
cssbestrpg
Senior Member
Posts: 287
Joined: Sun May 17, 2020 7:56 am
Location: Finland
Contact:

Re: [CS:S/CSGO] Zombie

Postby cssbestrpg » Fri Feb 26, 2021 6:31 pm

Update:
- Fixed zprop credits message after buy being wrong
- Fixed not removing players credits after zprop buy
- Fixed english mistypo in zprop buy

Return to “Plugin Releases”

Who is online

Users browsing this forum: No registered users and 10 guests