AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [TF2] crit change/modify plugin (https://forums.alliedmods.net/showthread.php?t=94909)

slipvyne 06-17-2009 02:36

[TF2] crit change/modify plugin
 
1 Attachment(s)
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.

Exolent[jNr] 06-17-2009 15:07

Re: [TF2] crit change/modify plugin
 
Post in the SourceMod section.

slipvyne 06-17-2009 19:46

Re: [TF2] crit change/modify plugin
 
my bad, posted there now.


All times are GMT -4. The time now is 22:24.

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