Raised This Month: $535 Target: $400
 133% 

Help my friends =0 ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
C0DY2K
Junior Member
Join Date: Jul 2022
Old 07-08-2022 , 22:14   Help my friends =0 ?
Reply With Quote #1

Hello, I have this cs 1.6 plugin here.

I would like to add a light strip in the player and a sound when the god, invincible mod is activated.

Somebody help me ?

Thank you all for your attention.
Attached Files
File Type: sma Get Plugin or Get Source (uselessplugin.sma - 39 views - 1.3 KB)
C0DY2K is offline
C0DY2K
Junior Member
Join Date: Jul 2022
Old 07-11-2022 , 07:27   Re: Help my friends =0 ?
Reply With Quote #2

Is that possible?
C0DY2K is offline
C0DY2K
Junior Member
Join Date: Jul 2022
Old 07-13-2022 , 07:29   Re: Help my friends =0 ?
Reply With Quote #3

It seems to be something impossible to do, because nobody help me =(
C0DY2K is offline
TribalBlood
Member
Join Date: Oct 2020
Location: Defqon.1
Old 07-13-2022 , 08:48   Re: Help my friends =0 ?
Reply With Quote #4

What do you mean by "light strip"?
__________________
TribalBlood is offline
C0DY2K
Junior Member
Join Date: Jul 2022
Old 07-14-2022 , 20:46   Re: Help my friends =0 ?
Reply With Quote #5

Quote:
Originally Posted by TribalBlood View Post
What do you mean by "light strip"?

Trail in player -> https://forums.alliedmods.net/showthread.php?p=1748392

I wanted this trail in the player at the moment when godmod is active and a sound playing.

can you help me ?
C0DY2K is offline
C0DY2K
Junior Member
Join Date: Jul 2022
Old 07-16-2022 , 16:50   Re: Help my friends =0 ?
Reply With Quote #6

'-'
C0DY2K is offline
C0DY2K
Junior Member
Join Date: Jul 2022
Old 07-17-2022 , 21:55   Re: Help my friends =0 ?
Reply With Quote #7

Please ANYONE?
C0DY2K is offline
TribalBlood
Member
Join Date: Oct 2020
Location: Defqon.1
Old 07-19-2022 , 15:48   Re: Help my friends =0 ?
Reply With Quote #8

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

#define TASK_TRAIL 3214
#define ID_TRAIL (taskid - TASK_TRAIL)

new Trailp_attacker_kills[33];

public 
plugin_precache()
{
    
register_event("DeathMsg""Kill_Handler""a");
    
RegisterHam(Ham_Spawn"player""Reset_Kills"1);
    
Trail precache_model("sprites/lgtning.spr");
}

public 
Reset_Kills(id)
{
    if(
is_user_alive(id))
    {
        
p_attacker_kills[id] = 0;
        
set_user_godmode(id0);
        
set_user_rendering(id);
        
Kill_Trail(id);
        
remove_task(id+TASK_TRAIL);
    }
}

public 
Kill_Handler()
{
    new 
Attacker read_data(1), Victim read_data(2);

    
p_attacker_kills[Attacker] += 1;

    if(
p_attacker_kills[Attacker] >= 3)
    {
        
p_attacker_kills[Attacker] = 0;
        
set_user_godmode(Attacker1);
        switch(
cs_get_user_team(Attacker))
        {
            case 
CS_TEAM_CT:
            {
                
set_user_rendering(AttackerkRenderFxGlowShell00255kRenderNormal1);
            }
            case 
CS_TEAM_T:
            {
                
set_user_rendering(AttackerkRenderFxGlowShell25500kRenderNormal1);
            }
        }
        
client_print(Attackerprint_center"You received invincible powers.");
        
set_task(0.1"Make_Trail"Attacker+TASK_TRAIL__"b");
        
set_task(10.0"Remove_Trail"Attacker);
    }

    if(
task_exists(Victim+TASK_TRAIL))
    {
        
Remove_Trail(Victim);
    }
}

public 
Make_Trail(taskid)
{
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY);
    
write_byte(22);
    
write_short(ID_TRAIL);
    
write_short(Trail);
    
write_byte(5);
    
write_byte(3);
    
write_byte(random_num(1255));
    
write_byte(random_num(1255));
    
write_byte(random_num(1255));
    
write_byte(255);
    
message_end();
}

public 
Remove_Trail(Attacker)
{
    
remove_task(Attacker+TASK_TRAIL);
    
Kill_Trail(Attacker);
    
set_user_godmode(Attacker0);
    
set_user_rendering(Attacker);
}

public 
Kill_Trail(Attacker)
{
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY);
    
write_byte(99);
    
write_short(Attacker);
    
message_end();

__________________
TribalBlood is offline
C0DY2K
Junior Member
Join Date: Jul 2022
Old 07-19-2022 , 19:44   Re: Help my friends =0 ?
Reply With Quote #9

Quote:
Originally Posted by TribalBlood View Post
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fun>
#include <hamsandwich>
#include <cstrike>

#define TASK_TRAIL 3214
#define ID_TRAIL (taskid - TASK_TRAIL)

new Trailp_attacker_kills[33];

public 
plugin_precache()
{
    
register_event("DeathMsg""Kill_Handler""a");
    
RegisterHam(Ham_Spawn"player""Reset_Kills"1);
    
Trail precache_model("sprites/lgtning.spr");
}

public 
Reset_Kills(id)
{
    if(
is_user_alive(id))
    {
        
p_attacker_kills[id] = 0;
        
set_user_godmode(id0);
        
set_user_rendering(id);
        
Kill_Trail(id);
        
remove_task(id+TASK_TRAIL);
    }
}

public 
Kill_Handler()
{
    new 
Attacker read_data(1), Victim read_data(2);

    
p_attacker_kills[Attacker] += 1;

    if(
p_attacker_kills[Attacker] >= 3)
    {
        
p_attacker_kills[Attacker] = 0;
        
set_user_godmode(Attacker1);
        switch(
cs_get_user_team(Attacker))
        {
            case 
CS_TEAM_CT:
            {
                
set_user_rendering(AttackerkRenderFxGlowShell00255kRenderNormal1);
            }
            case 
CS_TEAM_T:
            {
                
set_user_rendering(AttackerkRenderFxGlowShell25500kRenderNormal1);
            }
        }
        
client_print(Attackerprint_center"You received invincible powers.");
        
set_task(0.1"Make_Trail"Attacker+TASK_TRAIL__"b");
        
set_task(10.0"Remove_Trail"Attacker);
    }

    if(
task_exists(Victim+TASK_TRAIL))
    {
        
Remove_Trail(Victim);
    }
}

public 
Make_Trail(taskid)
{
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY);
    
write_byte(22);
    
write_short(ID_TRAIL);
    
write_short(Trail);
    
write_byte(5);
    
write_byte(3);
    
write_byte(random_num(1255));
    
write_byte(random_num(1255));
    
write_byte(random_num(1255));
    
write_byte(255);
    
message_end();
}

public 
Remove_Trail(Attacker)
{
    
remove_task(Attacker+TASK_TRAIL);
    
Kill_Trail(Attacker);
    
set_user_godmode(Attacker0);
    
set_user_rendering(Attacker);
}

public 
Kill_Trail(Attacker)
{
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY);
    
write_byte(99);
    
write_short(Attacker);
    
message_end();


Thanks, TribalBlood =))

can you add a sound to when godmod is active?
C0DY2K is offline
menkisa
Junior Member
Join Date: Sep 2011
Old 07-19-2022 , 20:50   Re: Help my friends =0 ?
Reply With Quote #10

Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fun>
#include <hamsandwich>
#include <cstrike>

#define TASK_TRAIL 3214
#define ID_TRAIL (taskid - TASK_TRAIL)

new const g_szGodSound[] = "buttons/blip2.wav";
new Trail, p_attacker_kills[33];


public plugin_precache()
{
    register_event("DeathMsg", "Kill_Handler", "a");
    RegisterHam(Ham_Spawn, "player", "Reset_Kills", 1);
    Trail = precache_model("sprites/lgtning.spr");
    precache_sound(g_szGodSound);
}

public Reset_Kills(id)
{
    if(is_user_alive(id))
    {
        p_attacker_kills[id] = 0;
        set_user_godmode(id, 0);
        set_user_rendering(id);
        Kill_Trail(id);
        remove_task(id+TASK_TRAIL);
    }
}

public Kill_Handler()
{
    new Attacker = read_data(1), Victim = read_data(2);

    p_attacker_kills[Attacker] += 1;

    if(p_attacker_kills[Attacker] >= 3)
    {
        p_attacker_kills[Attacker] = 0;
        set_user_godmode(Attacker, 1);
        switch(cs_get_user_team(Attacker))
        {
            case CS_TEAM_CT:
            {
                set_user_rendering(Attacker, kRenderFxGlowShell, 0, 0, 255, kRenderNormal, 1);
            }
            case CS_TEAM_T:
            {
                set_user_rendering(Attacker, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 1);
            }
        }
        client_print(Attacker, print_center, "You received invincible powers.");
        emit_sound(Attacker, CHAN_AUTO, g_szGodSound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM);
        set_task(0.1, "Make_Trail", Attacker+TASK_TRAIL, _, _, "b");
        set_task(10.0, "Remove_Trail", Attacker);
    }

    if(task_exists(Victim+TASK_TRAIL))
    {
        Remove_Trail(Victim);
    }
}

public Make_Trail(taskid)
{
    message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
    write_byte(22);
    write_short(ID_TRAIL);
    write_short(Trail);
    write_byte(5);
    write_byte(3);
    write_byte(random_num(1, 255));
    write_byte(random_num(1, 255));
    write_byte(random_num(1, 255));
    write_byte(255);
    message_end();
}

public Remove_Trail(Attacker)
{
    remove_task(Attacker+TASK_TRAIL);
    Kill_Trail(Attacker);
    set_user_godmode(Attacker, 0);
    set_user_rendering(Attacker);
}

public Kill_Trail(Attacker)
{
    message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
    write_byte(99);
    write_short(Attacker);
    message_end();
}
menkisa 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 20:02.


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