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

[TF2] crit change/modify plugin


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
slipvyne
Junior Member
Join Date: Jun 2009
Old 06-17-2009 , 02:36   [TF2] crit change/modify plugin
#1

First off i wanna say thank you to pRED for a model on how to do this. I wrote this from scratch, but took some concepts from his plugin found here: http://forums.alliedmods.net/showthr...ht=crit+change


I am having trouble with a critical change/modify plugin i have written.

Functionality-
It has 3 main working parts.
-The first being given a player name and a bool var, that player will always crit
-The second is a class "restrict" cvars. If turned to 0, they that class will always crit.
-The third is a simple % change. This changes how often, server wide, plays will crit. The mechanics of this is dumbed down, and i would like help on this to give it better rates that are more like server crits. Right now its random. Unlike when the pyro/heavy/medic crits with their respective weapons in a vanilla server, this will just do a percentage. IE, when a heavy crits, the next 30 or so bullets from its chaingun will crit as well, while this, a random one in cvar% will crit

The main problem I am having though, is i want to create a bool cvar that will essentially turn off the plugin, so crits act like a vanilla unmodified server. What it does now, is completely turns off crits. I was told in MIRC chat that as long as i do not change the result arguement in the function i am overloading, it will not effect the server's calculations. But the only time i ahve found it to crit is when i have the backburner. And yes, the kritskreig does not crit either.

This is my first plugin I have written so I am still very new to the game. I am a CS major at ASU, and really looking for a way to practice code. I have a coding background, but I am very new to scripting so please be gentle on the faults you do find. Any help and posts is much appreciated.

Side note, there is alot of commented out code, I am also working with a few others who are not as well adjusted to coding. Basiclly trying to help them understand what each function does.
Attached Files
File Type: sp Get Plugin or Get Source (critChange.sp - 557 views - 6.7 KB)
slipvyne is offline
Send a message via AIM to slipvyne Send a message via MSN to slipvyne
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-17-2009 , 15:07   Re: [TF2] crit change/modify plugin
#2

Post in the SourceMod section.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
slipvyne
Junior Member
Join Date: Jun 2009
Old 06-17-2009 , 19:46   Re: [TF2] crit change/modify plugin
#3

my bad, posted there now.
slipvyne is offline
Send a message via AIM to slipvyne Send a message via MSN to slipvyne
Closed Thread



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 11:49.


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