Raised This Month: $19 Target: $400
 4% 

Spawn protection after first hit


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MihailoZoric
Junior Member
Join Date: Oct 2014
Old 03-28-2015 , 11:11   Spawn protection after first hit
Reply With Quote #1



This is the plugin for hns mod. When CT attacks T after first hit T has spawn protection for 2-3 seconds.
MihailoZoric is offline
Obada
Senior Member
Join Date: Dec 2014
Location: Abu Dhabi
Old 03-28-2015 , 13:26   Re: Spawn protection after first hit
Reply With Quote #2

Post the plugin between [php] tags or attach the .sma
Obada is offline
monster321
Member
Join Date: Apr 2012
Old 03-28-2015 , 14:42   Re: Spawn protection after first hit
Reply With Quote #3

I think that he want this plugin, try with this:

Code:
#include < amxmodx > #include < fun > #include < hamsandwich > #define TASK_GODMODE 1111 // Init public plugin_init() {     // Register     register_plugin( "Auto-Chance HNS", "1.0", "monster321" )         // Hams     RegisterHam( Ham_TakeDamage, "player", "HamTakeDamage" ) } // TakeDamage public HamTakeDamage( vic, inflictor, id, Float:damage, bits ) {     if( !is_user_connected( id ) )         return HAM_IGNORED;         if( get_user_team( vic ) == 1 )     {         new health;         health = get_user_health( vic )                 if( health > floatround( damage ) )         {             set_user_godmode( vic, 1 )             set_user_rendering( vic, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 16 )                         set_task( random_float( 2.0, 3.0 ), "godmode_off", vic + TASK_GODMODE )         }     }         return HAM_IGNORED; } public godmode_off( id ) {     id -= TASK_GODMODE;         set_user_godmode( id, 0 )     set_user_rendering( id, kRenderFxGlowShell, 0, 0, 0, kRenderNormal, 25 ) }
monster321 is offline
Send a message via MSN to monster321 Send a message via Skype™ to monster321
MihailoZoric
Junior Member
Join Date: Oct 2014
Old 03-29-2015 , 14:44   Re: Spawn protection after first hit
Reply With Quote #4

Quote:
Originally Posted by monster321 View Post
I think that he want this plugin, try with this:

Code:
#include < amxmodx > #include < fun > #include < hamsandwich > #define TASK_GODMODE 1111 // Init public plugin_init() {     // Register     register_plugin( "Auto-Chance HNS", "1.0", "monster321" )         // Hams     RegisterHam( Ham_TakeDamage, "player", "HamTakeDamage" ) } // TakeDamage public HamTakeDamage( vic, inflictor, id, Float:damage, bits ) {     if( !is_user_connected( id ) )         return HAM_IGNORED;         if( get_user_team( vic ) == 1 )     {         new health;         health = get_user_health( vic )                 if( health > floatround( damage ) )         {             set_user_godmode( vic, 1 )             set_user_rendering( vic, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 16 )                         set_task( random_float( 2.0, 3.0 ), "godmode_off", vic + TASK_GODMODE )         }     }         return HAM_IGNORED; } public godmode_off( id ) {     id -= TASK_GODMODE;         set_user_godmode( id, 0 )     set_user_rendering( id, kRenderFxGlowShell, 0, 0, 0, kRenderNormal, 25 ) }
This plugin has a bug. I have to hit T 6 times to kill him. :O
MihailoZoric is offline
monster321
Member
Join Date: Apr 2012
Old 03-29-2015 , 23:58   Re: Spawn protection after first hit
Reply With Quote #5

Because maybe you are using the primmary attack or the T have more of 100HP and i don't known that. Try with this again:

Code:
#include < amxmodx > #include < fun > #include < hamsandwich > #define TASK_GODMODE 1111 // Variable needed new were_touched[ 33 ]; // Init public plugin_init() {     // Register     register_plugin( "Auto-Chance HNS", "1.0", "monster321" )         // Hams     RegisterHam( Ham_Spawn, "player", "HamSpawnPlayer" )     RegisterHam( Ham_TakeDamage, "player", "HamTakeDamage" ) } // Client putinserver public client_putinserver( id )     were_touched[ id ] = 0; // SpawnPlayer public HamSpawnPlayer( id ) {     if( !is_user_connected( id ) )         return HAM_IGNORED;         were_touched[ id ] = 0;     return HAM_IGNORED; } // TakeDamage public HamTakeDamage( vic, inflictor, id, Float:damage, bits ) {     if( !is_user_connected( id ) )         return HAM_IGNORED;         if( get_user_team( vic ) == 1 && !were_touched[ vic ] )     {         new health;         health = get_user_health( vic )                 if( health > floatround( damage ) )         {             set_user_godmode( vic, 1 )             set_user_rendering( vic, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 16 )                         set_task( random_float( 2.0, 3.0 ), "godmode_off", vic + TASK_GODMODE )         }                 were_touched[ vic ] = 1;     }         return HAM_IGNORED; } public godmode_off( id ) {     id -= TASK_GODMODE;         set_user_godmode( id, 0 )     set_user_rendering( id, kRenderFxGlowShell, 0, 0, 0, kRenderNormal, 25 ) }
monster321 is offline
Send a message via MSN to monster321 Send a message via Skype™ to monster321
MihailoZoric
Junior Member
Join Date: Oct 2014
Old 03-31-2015 , 12:05   Re: Spawn protection after first hit
Reply With Quote #6

Again. I need to hit TS 3 times.
MihailoZoric 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 03:58.


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