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

SpawnProtection


Post New Thread Reply   
 
Thread Tools Display Modes
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-16-2010 , 16:15   Re: SpawnProtection
Reply With Quote #21

Quote:
Originally Posted by xPaw View Post
It won't block players die from non-players, for example trigger_hurt.
LIES

Code:
// When touched, a hurt trigger does DMG points of damage each half-second
void CBaseTrigger :: HurtTouch ( CBaseEntity *pOther )
{
	float fldmg;

	if ( !pOther->pev->takedamage )
		return;

About code, why do you check TR_iHitgroup ??

Major error is that you enable/disable TraceAttack forward when player spawn / in task, but the forward is not player index specific.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 04-17-2010 at 02:56.
ConnorMcLeod is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 04-16-2010 , 16:21   Re: SpawnProtection
Reply With Quote #22

Quote:
Originally Posted by ConnorMcLeod View Post
LIES

Code:
// When touched, a hurt trigger does DMG points of damage each half-second
void CBaseTrigger :: HurtTouch ( CBaseEntity *pOther )
{
	float fldmg;

	if ( !pOther->pev->takedamage )
		return;
I meant traceattack way, not godmode way.
__________________
xPaw is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-16-2010 , 16:25   Re: SpawnProtection
Reply With Quote #23

Oh sure


Fixed using set_user_godmode (+ vars correctly named).
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>

#define PLUGIN "SpawnProtection"
#define VERSION "1.4"
#define AUTHOR "a.aqua"

new CvarSPTimeCvarSPMsgCvarSPEffect

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_dictionary("SpawnProtection.txt")

    
CvarSPTime register_cvar "sp_time""10.0")
    
CvarSPMsg register_cvar "sp_msgshow""1")
    
CvarSPEffect register_cvar "sp_msgeffect""0")

    
RegisterHam(Ham_Spawn"player""SpOn"1)
}

public 
SpOn(id)
{
    if (
is_user_alive(id))
    {
        new 
Float:flTime get_pcvar_float(CvarSPTime)
        new 
iColorIndex _:cs_get_user_team(id) - 1

        
static const colors[][] = {
            {
25500},
            {
00255}
        }

        if ( 
get_pcvar_num(CvarSPMsg) )
        {
            
set_hudmessage(25511, -1.0, -1.0clamp(get_pcvar_num(CvarSPEffect), 02), 6.0flTime0.10.2, -1)
            
show_hudmessage(id"%L"id"SP_SHWMSG"floatroundflTime ))
        }

        
set_user_rendering(idkRenderFxGlowShellcolors[iColorIndex][0], colors[iColorIndex][1], colors[iColorIndex][2], kRenderNormal10)
        
remove_task(id)
        
set_task(flTime"SpOff"id)
        
set_user_godmode(id1)
    }

    return 
PLUGIN_HANDLED
}

public 
SpOff(id)
{
    if( 
is_user_aliveid ) )
    {
        
set_user_godmode(id0)
        
set_user_rendering(id_000_0)
    }

What you should do and would make your plugin unique, would be, during protect time, prevent protected player from giving damage to other players.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 04-17-2010 at 02:56.
ConnorMcLeod is offline
a.aqua
Senior Member
Join Date: Jul 2009
Location: Russia
Old 04-17-2010 , 07:50   Re: SpawnProtection
Reply With Quote #24





Anyway, thanks for help
__________________

Last edited by a.aqua; 04-17-2010 at 07:53.
a.aqua is offline
Send a message via ICQ to a.aqua
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-17-2010 , 09:31   Re: SpawnProtection
Reply With Quote #25

I have long hair, please fix it.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
lazarev
Veteran Member
Join Date: Sep 2008
Old 04-17-2010 , 13:13   Re: SpawnProtection
Reply With Quote #26

Quote:
Originally Posted by ConnorMcLeod View Post
I have long hair, please fix it.
No Problem.

Last edited by lazarev; 04-18-2010 at 12:17.
lazarev is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-17-2010 , 13:16   Re: SpawnProtection
Reply With Quote #27

Said long, but nice attempt.

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 04-17-2010 , 13:37   Re: SpawnProtection
Reply With Quote #28

Emo detected ? o.O
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
a.aqua
Senior Member
Join Date: Jul 2009
Location: Russia
Old 04-17-2010 , 13:39   Re: SpawnProtection
Reply With Quote #29

Quote:
Originally Posted by ConnorMcLeod View Post
Said long, but nice attempt.

You are emo?
__________________

Last edited by a.aqua; 04-17-2010 at 13:43.
a.aqua is offline
Send a message via ICQ to a.aqua
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-17-2010 , 13:44   Re: SpawnProtection
Reply With Quote #30

Quote:
Originally Posted by a.aqua View Post
You are emo?
No, Baroque 1672
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
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 20:05.


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