Raised This Month: $ Target: $400
 0% 

[REQ] Team Pain Shock Free


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jingojang
Senior Member
Join Date: Feb 2010
Location: The Moon
Old 09-13-2013 , 07:40   [REQ] Team Pain Shock Free
Reply With Quote #1

Hi,

as the title states, I need a plugin that gives one team no painshock by cvar or just auto I guess.

Thanks!
jingojang is offline
dark_style
Senior Member
Join Date: Jul 2009
Location: Bulgaria
Old 09-13-2013 , 09:40   Re: [REQ] Team Pain Shock Free
Reply With Quote #2

What is a pain shock ?
__________________



dark_style is offline
jingojang
Senior Member
Join Date: Feb 2010
Location: The Moon
Old 09-13-2013 , 09:42   Re: [REQ] Team Pain Shock Free
Reply With Quote #3

Quote:
Originally Posted by dark_style View Post
What is a pain shock ?
When you get hit by a bullet or maybe get stabed, you wont get slowed down. You are free from pain shocks that slows you down.
jingojang is offline
Zerk0o0o0
Member
Join Date: Feb 2010
Old 09-13-2013 , 11:05   Re: [REQ] Team Pain Shock Free
Reply With Quote #4

http://forums.alliedmods.net/showthread.php?p=427881
You are looking for this?
Zerk0o0o0 is offline
Old 09-13-2013, 12:15
dark_style
This message has been deleted by dark_style.
jingojang
Senior Member
Join Date: Feb 2010
Location: The Moon
Old 09-14-2013 , 13:29   Re: [REQ] Team Pain Shock Free
Reply With Quote #5

Quote:
Originally Posted by Zerk0o0o0 View Post
Yes, but only for one team.
jingojang is offline
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 09-14-2013 , 14:29   Re: [REQ] Team Pain Shock Free
Reply With Quote #6

Tex is some is in the terroist team just add this
Code:
if ( cs_get_user_team(id) == CS_TEAM_T )
{
//What happends if ur T in here
}
Just Edit the no pain shock plugin a little
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.

Last edited by ironskillz1; 09-14-2013 at 14:35.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
jingojang
Senior Member
Join Date: Feb 2010
Location: The Moon
Old 09-14-2013 , 16:40   Re: [REQ] Team Pain Shock Free
Reply With Quote #7

Quote:
Originally Posted by ironskillz1 View Post
Tex is some is in the terroist team just add this
Code:
if ( cs_get_user_team(id) == CS_TEAM_T )
{
//What happends if ur T in here
}
Just Edit the no pain shock plugin a little
Not really any help, post the readjusted code please! :/
jingojang is offline
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 09-14-2013 , 16:44   Re: [REQ] Team Pain Shock Free
Reply With Quote #8

Tomorrow, im not on my computer right now
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 09-15-2013 , 07:43   Re: [REQ] Team Pain Shock Free
Reply With Quote #9

This should do the trick.
PHP Code:
/*  AMX Mod X script.

Pain Shock Free Plugin

(c) Copyright 2007, Simon Logic (e-mail: [email protected])
This file is provided as is (no warranties).

Info:
When a player is hit he slows down a bit because of a pain shock. 
Sometimes it's very annoying, especially when playing dynamic style 
mod, e.g. CSDM. This plugin can turn off original player's slowdown 
on bullet hit.

Requirements:
* CS/CZ mod
* AMX/X 1.7x or higher
* Fakemeta module

New cvars:
* amx_painshockfree <0|1> (default=1)

History:
1.0.0 [2007-12-16]
* first release
*/

#include <amxmodx>
#include <fakemeta>
#include <cstrike>

#define MY_PLUGIN_NAME    "Pain Shock Free"
#define MY_PLUGIN_VERSION "1.0.0"
#define MY_PLUGIN_AUTHOR  "Simon Logic"


new bool:g_bRestoreVel
new Float:g_vecVel[3]
new 
g_cvarPainShockFree
new g_fmPlayerPreThink
new g_fmPlayerPreThink_Post
//-----------------------------------------------------------------------------
public plugin_init()
{
    
register_plugin(MY_PLUGIN_NAMEMY_PLUGIN_VERSIONMY_PLUGIN_AUTHOR)
    
    
g_cvarPainShockFree register_cvar("amx_painshockfree""1"FCVAR_SERVER)
    
    
g_fmPlayerPreThink register_forward(FM_PlayerPreThink"onPlayerPreThink")
    
g_fmPlayerPreThink_Post register_forward(FM_PlayerPreThink"onPlayerPreThink_Post"1)
}
//-----------------------------------------------------------------------------
public plugin_end()
{
    if(
g_fmPlayerPreThink)
        
unregister_forward(FM_PlayerPreThinkg_fmPlayerPreThink)
    if(
g_fmPlayerPreThink_Post)
        
unregister_forward(FM_PlayerPreThinkg_fmPlayerPreThink_Post1)
}
//-----------------------------------------------------------------------------
public onPlayerPreThink(id)
{
    if(
get_pcvar_num(g_cvarPainShockFree))
    {
        if ( 
cs_get_user_team(id) == CS_TEAM_T )
        {    
            if(
pev_valid(id) && is_user_alive(id) && (FL_ONGROUND pev(idpev_flags)))
            {
                
pev(idpev_velocityg_vecVel)
                
g_bRestoreVel true
            
}
            return 
FMRES_HANDLED
        
}
    }
    return 
FMRES_IGNORED
}
//-----------------------------------------------------------------------------
public onPlayerPreThink_Post(id)
{
if(
g_bRestoreVel)
{
    
g_bRestoreVel false
    
    
if(!(FL_ONTRAIN pev(idpev_flags)))
    {
        
// NOTE: within DLL PlayerPreThink Jump() function is called;
        // there is a conveyor velocity addiction we should care of
        
        
static iGEnt
        
        iGEnt 
pev(idpev_groundentity)
        if(
pev_valid(iGEnt) && (FL_CONVEYOR pev(iGEntpev_flags)))
        {
            static 
Float:vecTemp[3]
            
            
pev(idpev_basevelocityvecTemp)
            
            
g_vecVel[0] += vecTemp[0]
            
g_vecVel[1] += vecTemp[1]
            
g_vecVel[2] += vecTemp[2]
        }                
        
        
set_pev(idpev_velocityg_vecVel)
        
        return 
FMRES_HANDLED
    
}
}

return 
FMRES_IGNORED
}
//----------------------------------------------------------------------------- 
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.

Last edited by ironskillz1; 09-15-2013 at 07:43.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
Reply



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 06:35.


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