Raised This Month: $32 Target: $400
 8% 

[Request] Revive full flashed cts that died


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Snake.
Senior Member
Join Date: Jul 2017
Old 07-16-2018 , 00:23   [Request] Revive full flashed cts that died
Reply With Quote #1

Hello. In the mod i play, hns , there is a rule that terrorists cannot air flash Cts. I mean they throw flash to air and this cause cts to be flashed and die. If a Ct dies when it is full flashed, i want him to be revived. Thank you all..
Snake. is offline
Send a message via Skype™ to Snake.
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 07-16-2018 , 01:26   Re: [Request] Revive full flashed cts that died
Reply With Quote #2

Not tested.

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new bool:bFlashed[33]

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_message(get_user_msgid"ScreenFade" ), "MessageScreenFade")
}

public 
MessageScreenFade(iMsgIdiDestid)
{
    if(
get_msg_arg_int) == 255 && get_msg_arg_int) == 255 && get_msg_arg_int) == 255)
    {
        new 
iAlpha get_msg_arg_int);
        if( 
iAlpha == 200 || iAlpha == 255 && cs_get_user_team(id) == CS_TEAM_CT)
        {
            
bFlashed[id] = true
            set_task
(0.5"Respawn"id)
        }
    }
}

public 
Respawn(id)
{
    if(!
is_user_connected(id) || is_user_alive(id))
        return
        
    
ExecuteHamB(Ham_CS_RoundRespawnid)

iceeedr is offline
Send a message via Skype™ to iceeedr
Snake.
Senior Member
Join Date: Jul 2017
Old 07-16-2018 , 01:56   Re: [Request] Revive full flashed cts that died
Reply With Quote #3

Quote:
Originally Posted by iceeedr View Post
Not tested.

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new bool:bFlashed[33]

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_message(get_user_msgid"ScreenFade" ), "MessageScreenFade")
}

public 
MessageScreenFade(iMsgIdiDestid)
{
    if(
get_msg_arg_int) == 255 && get_msg_arg_int) == 255 && get_msg_arg_int) == 255)
    {
        new 
iAlpha get_msg_arg_int);
        if( 
iAlpha == 200 || iAlpha == 255 && cs_get_user_team(id) == CS_TEAM_CT)
        {
            
bFlashed[id] = true
            set_task
(0.5"Respawn"id)
        }
    }
}

public 
Respawn(id)
{
    if(!
is_user_connected(id) || is_user_alive(id))
        return
        
    
ExecuteHamB(Ham_CS_RoundRespawnid)

Does not work
Snake. is offline
Send a message via Skype™ to Snake.
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 07-16-2018 , 09:01   Re: [Request] Revive full flashed cts that died
Reply With Quote #4

Try changing the task to 4.0
iceeedr is offline
Send a message via Skype™ to iceeedr
Snake.
Senior Member
Join Date: Jul 2017
Old 07-16-2018 , 10:00   Re: [Request] Revive full flashed cts that died
Reply With Quote #5

Works now but it revives cts that a few flashed too. I only want it to wark with full-flashed. Because full flashed players cannot see anything. Is it possible to fix it ?
Snake. is offline
Send a message via Skype™ to Snake.
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 07-16-2018 , 11:36   Re: [Request] Revive full flashed cts that died
Reply With Quote #6

I think this way..

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new bool:bFlashed[33]

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_message(get_user_msgid"ScreenFade" ), "MessageScreenFade")
}

public 
MessageScreenFade(iMsgIdiDestid)
{
    if(
get_msg_arg_int) == 255 && get_msg_arg_int) == 255 && get_msg_arg_int) == 255)
    {
        new 
iAlpha get_msg_arg_int);
        if( 
iAlpha == 200 || iAlpha == 255 && cs_get_user_team(id) == CS_TEAM_CT)
        {
            
bFlashed[id] = true
            set_task
(2.0"Respawn"id)
        }
    }
}

public 
Respawn(id)
{
    if(!
is_user_connected(id) || is_user_alive(id))
        return
        
    
ExecuteHamB(Ham_CS_RoundRespawnid)
    
bFlashed[id] = false
}

public 
client_putinserver(id)
{
    
bFlashed[id] = false
}

public 
client_disconnect(id)
{
    
bFlashed[id] = false

iceeedr is offline
Send a message via Skype™ to iceeedr
Snake.
Senior Member
Join Date: Jul 2017
Old 07-17-2018 , 03:17   Re: [Request] Revive full flashed cts that died
Reply With Quote #7

Quote:
Originally Posted by iceeedr View Post
I think this way..

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

new bool:bFlashed[33]

public 
plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_message(get_user_msgid"ScreenFade" ), "MessageScreenFade")
}

public 
MessageScreenFade(iMsgIdiDestid)
{
    if(
get_msg_arg_int) == 255 && get_msg_arg_int) == 255 && get_msg_arg_int) == 255)
    {
        new 
iAlpha get_msg_arg_int);
        if( 
iAlpha == 200 || iAlpha == 255 && cs_get_user_team(id) == CS_TEAM_CT)
        {
            
bFlashed[id] = true
            set_task
(2.0"Respawn"id)
        }
    }
}

public 
Respawn(id)
{
    if(!
is_user_connected(id) || is_user_alive(id))
        return
        
    
ExecuteHamB(Ham_CS_RoundRespawnid)
    
bFlashed[id] = false
}

public 
client_putinserver(id)
{
    
bFlashed[id] = false
}

public 
client_disconnect(id)
{
    
bFlashed[id] = false

Thanks, works but it revives the ones who is watching the flashed ones too.
Snake. is offline
Send a message via Skype™ to Snake.
D4rkSiD3Rs
Senior Member
Join Date: Jan 2018
Location: Morocco
Old 07-17-2018 , 06:38   Re: [Request] Revive full flashed cts that died
Reply With Quote #8

Try this! not tested..

PHP Code:
#include <amxmodx> 
#include <amxmisc> 
#include <cstrike> 
#include <fakemeta>
#include <hamsandwich> 

#define PLUGIN "New Plug-In" 
#define VERSION "1.0" 
#define AUTHOR "author" 

new bool:bFlashed[33

public 
plugin_init()  

    
register_plugin(PLUGINVERSIONAUTHOR
    
register_message(get_user_msgid"ScreenFade" ), "MessageScreenFade"


public 
MessageScreenFade(iMsgIdiDestid

    if(
get_msg_arg_int) == 255 && get_msg_arg_int) == 255 && get_msg_arg_int) == 255
    { 
        new 
iAlpha get_msg_arg_int); 
        if( 
iAlpha == 200 || iAlpha == 255 && cs_get_user_team(id) == CS_TEAM_CT
        { 
            new 
spec pev(idpev_iuser2);
            if(
spec)
            {
                
bFlashed[id] = true 
                set_task
(2.0"Respawn"id
            }
        } 
    } 


public 
Respawn(id

    if(!
is_user_connected(id) || is_user_alive(id)) 
        return 
         
    
ExecuteHamB(Ham_CS_RoundRespawnid
    
bFlashed[id] = false 


public 
client_putinserver(id

    
bFlashed[id] = false 


public 
client_disconnect(id

    
bFlashed[id] = false 


Last edited by D4rkSiD3Rs; 07-17-2018 at 12:32.
D4rkSiD3Rs is offline
Snake.
Senior Member
Join Date: Jul 2017
Old 07-17-2018 , 11:45   Re: [Request] Revive full flashed cts that died
Reply With Quote #9

Quote:
Originally Posted by D4rkSiD3Rs View Post
Try this! not tested..

PHP Code:
#include <amxmodx> 
#include <amxmisc> 
#include <cstrike> 
#include <fakemeta>
#include <hamsandwich> 

#define PLUGIN "New Plug-In" 
#define VERSION "1.0" 
#define AUTHOR "author" 

new bool:bFlashed[33
const 
pev_spec pev_iuser2;

public 
plugin_init()  

    
register_plugin(PLUGINVERSIONAUTHOR
    
register_message(get_user_msgid"ScreenFade" ), "MessageScreenFade"


public 
MessageScreenFade(iMsgIdiDestid

    if(
get_msg_arg_int) == 255 && get_msg_arg_int) == 255 && get_msg_arg_int) == 255
    { 
        new 
iAlpha get_msg_arg_int); 
        if( 
iAlpha == 200 || iAlpha == 255 && cs_get_user_team(id) == CS_TEAM_CT
        { 
            
bFlashed[id] = true 
            set_task
(2.0"Respawn"id
        } 
    } 


public 
Respawn(id

    new 
spec pev(idpev_spec);

    if(!
is_user_connected(id) || is_user_alive(id) || spec
        return 
         
    
ExecuteHamB(Ham_CS_RoundRespawnid
    
bFlashed[id] = false 


public 
client_putinserver(id

    
bFlashed[id] = false 


public 
client_disconnect(id

    
bFlashed[id] = false 

does not work^^
Snake. is offline
Send a message via Skype™ to Snake.
D4rkSiD3Rs
Senior Member
Join Date: Jan 2018
Location: Morocco
Old 07-17-2018 , 12:33   Re: [Request] Revive full flashed cts that died
Reply With Quote #10

Quote:
Originally Posted by D4rkSiD3Rs View Post
Try this! not tested..

PHP Code:
#include <amxmodx> 
#include <amxmisc> 
#include <cstrike> 
#include <fakemeta>
#include <hamsandwich> 

#define PLUGIN "New Plug-In" 
#define VERSION "1.0" 
#define AUTHOR "author" 

new bool:bFlashed[33

public 
plugin_init()  

    
register_plugin(PLUGINVERSIONAUTHOR
    
register_message(get_user_msgid"ScreenFade" ), "MessageScreenFade"


public 
MessageScreenFade(iMsgIdiDestid

    if(
get_msg_arg_int) == 255 && get_msg_arg_int) == 255 && get_msg_arg_int) == 255
    { 
        new 
iAlpha get_msg_arg_int); 
        if( 
iAlpha == 200 || iAlpha == 255 && cs_get_user_team(id) == CS_TEAM_CT
        { 
            new 
spec pev(idpev_iuser2);
            if(
spec)
            {
                
bFlashed[id] = true 
                set_task
(2.0"Respawn"id
            }
        } 
    } 


public 
Respawn(id

    if(!
is_user_connected(id) || is_user_alive(id)) 
        return 
         
    
ExecuteHamB(Ham_CS_RoundRespawnid
    
bFlashed[id] = false 


public 
client_putinserver(id

    
bFlashed[id] = false 


public 
client_disconnect(id

    
bFlashed[id] = false 

Edited! Try it again x)
D4rkSiD3Rs 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 22:17.


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