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

Hacker gamemode


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kuuichi
Junior Member
Join Date: May 2016
Location: los angeles
Old 11-24-2016 , 19:42   Hacker gamemode
Reply With Quote #1

Hey guys! I tried to make a new gamemode at one point and I figured I would post the source here if anyone wants to play with the code - it kind of works I think? (not really)

This was from last summer - the game works by making players /q or /queue for a game when they join, game won't start until a certain amount of players is met

Basically there's a team with a hacker ("hacker team") and a team with no hacker, but perks ("perk team"). The hacker is selected randomly and given x-ray and the round is played out - the perk team gets to vote on a perk at the beginning of the round and they vote to figure out who they suspect the hacker is at the end of the round. If the hacker is singled out correctly by majority vote, on the next round (when the hacker team becomes the perk team and vice versa) the new perk team is denied a perk. I'm not sure how much of this is still working, but if anyone was interested in picking it up:

Also yes, I know I suck at scripting

http://pastebin.com/LGC0XKEh
__________________
i guess i have a picture of jon skeet as my avatar
kuuichi is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 11-25-2016 , 01:31   Re: Hacker gamemode
Reply With Quote #2

quick tip, CPS_SetSkin returns the skin index and will remove any previous skin on the client.
Mitchell is offline
kuuichi
Junior Member
Join Date: May 2016
Location: los angeles
Old 11-25-2016 , 03:52   Re: Hacker gamemode
Reply With Quote #3

Quote:
Originally Posted by Mitchell View Post
quick tip, CPS_SetSkin returns the skin index and will remove any previous skin on the client.
HTML Code:
CPS_RemoveSkin(client);
CPS_SetSkin(client, model, CPS_RENDER);
int skin = CPS_GetSkin(client);
So all of that was redundant and could've been one line?

I made this a little while ago so I'm pretty sure I copied this off of some other person's plugin to get an XRAY working, but thanks for the tip! Mostly just posting this because I don't write plugins anymore and I thought (maybe) someone might want to play with this.
__________________
i guess i have a picture of jon skeet as my avatar
kuuichi is offline
Reply


Thread Tools
Display Modes

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 20:39.


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