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

Laser Mod v1.7


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
EFFx
Veteran Member
Join Date: Feb 2016
Location: Sγo Paulo, Brasil
Old 10-21-2016 , 15:01   Laser Mod v1.7
Reply With Quote #1

LASER MOD v1.7

- Description

- This mod i've made just for take my time because i had no internet, because it i start make just a laser normal, but i got a idea for make an mod. This mod is a little copy from a brazilian joke called "Pega-Congelou". In this joke, when someone touch someone, he cannot move, but when other people that was not who touched him first touch him, he can move again. And I made this on CS Version.

- Features

1. When you put the laser on your enemy, he will be freezed for X seconds ( controlled by a cvar ), when hes freezed, he got rendering + freeze + no laser. If his teammate put his laser on him, his freeze will get out, his teammate will save him.

2. I added "Freeze Nade", a new grenade mod that i pickup the format from frost nades and edited it by myself.

3. Saying /lcmenu, you can custominate your laser with those colors: Orange, blue, green, yellow, purple and white.

4. I've added those especials items typing /lmenu:

- Immortality - You cannot be freezed per 15 seconds.
- +1 Life - When the first time for you die finish, the plugin will set this time again
- Freeze Nade
- Smoke teleport
- Get out the freeze - Your freeze ends, but if have an enemy looking for you, he will freeze you again.
- Kill with one shot - If you put your laser on a enemy, he will die, not freeze.
- Invisibility - Your laser and your personage get invisibility per 20 seconds.

OBS: Get out the freeze, Kill with one shot and invisibility is only for LVIPS ( Laser Vips )
You can buy those items using LMs ( Laser Moneys ) that you got when you freeze/kill players ( obviously, lvips have privilegies )

5. Your LMs will be saved when you disconnect from the server.

6. Your laser only will be enable if you move after the round's start.

7. I have added these plugins from others scripters, if you want use they, here's the list:

- Galileo
- Hud customizer
- Noobjectives
- Nademodes
- Semiclip
- No Kill self
- Auto Team balance
- Transfer money
- Etc...

- Cvars

lasermod_freezeannounce - Show a message and sound when a player freeze X players.
lasermod_freezeannounce_freezes - How much freezes to show the message.
lm_freezes_to_humiliation - How many freezes the freezer need to show the message "You're humiliating X"
lm_freezes_toplay_sound - How many freezes the freezer need to play a sound "Monster kill"

- Change Log

Spoiler


OBS: I'm editing him, suggestions and corrections are welcome.
Attached Files
File Type: sma Get Plugin or Get Source (Laser_Mod.sma - 696 views - 31.5 KB)
File Type: zip Laser Mod.zip (952.0 KB, 169 views)
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 06-22-2017 at 15:51.
EFFx is offline
ish12321
Veteran Member
Join Date: May 2016
Old 10-23-2016 , 12:09   Re: Laser Mod v1.0 (Updates coming)
Reply With Quote #2

What about a small video to see it in action please ?
__________________
['O|s|G'] | Death Wins a.k.a Ish Chhabra was here
ish12321 is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: Sγo Paulo, Brasil
Old 10-23-2016 , 15:19   Re: Laser Mod v1.0 (Updates coming)
Reply With Quote #3

I have an Video on my channel explaining what this mod do. But Is so Lagged, i Recommend You Install and Test it by yourself.
Im At phone now. When i turn to pc ill show More.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 10-23-2016 at 15:31.
EFFx is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: Sγo Paulo, Brasil
Old 11-23-2016 , 12:59   Re: Laser Mod v1.0 (Updates coming)
Reply With Quote #4

New plugin update, see the spoiler on description for more informations.

I made this if you guys want only one plugin, not a mod:

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

#define PLUGIN "Laser"
#define VERSION "1.0"
#define AUTHOR "Alliedmodders/EFFx"

#define cmx(%1) (sizeof(%1) - 1)
#define play_sound(%1,%2,%3) emit_sound(%1,CHAN_ITEM,%2,VOL_NORM,ATTN_NORM,0,%3)
#define take_damage(%1,%2) set_user_health(%1,get_user_health(%1) - %2)

#define INVALID_WEAPONS ((1 << CSW_KNIFE)|(1<<CSW_HEGRENADE)|(1<<CSW_FLASHBANG)|(1<<CSW_SMOKEGRENADE)|(1<<CSW_C4))
#define szPrefix "!g[Laser]!y:"
#define SPRITE_LASER "sprites/lgtning.spr"

new g_iLaserSprite

new const sounds_lased[][] = 
{
    
"player/pl_pain2.wav",
    
"player/pl_pain4.wav",
    
"player/pl_pain5.wav",
    
"player/pl_pain6.wav",
    
"player/pl_pain7.wav"
}

new const 
sound_laseron[] = "items/nvg_on.wav"
new const sound_laseroff[] = "items/nvg_off.wav"

new iMaxPlayers

new bool:InimigoNoLaser[33]
new 
bool:Laser[33]
new 
bool:BroughtLaser[33]
new 
bool:menu_is_open[33]

new 
iPcvarBonus,iPcvarHealthRemoveiDefaultLaserColor,iPcvarBuyCostiPcvarFreeLaser

const MAX_MONEY 16000

new UsandoLaser,LevandoLaser
new iScreenShakeiScreenFade

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
iMaxPlayers get_maxplayers()
    
    
iScreenFade get_user_msgid("ScreenFade")
    
iScreenShake get_user_msgid("ScreenShake")
    
    
iPcvarBuyCost register_cvar("laser_buycost","3000")
    
iDefaultLaserColor register_cvar("laser_defaultcolor","white")
    
iPcvarHealthRemove register_cvar("laser_healthremove","10")
    
iPcvarBonus register_cvar("laser_killbonus","500")
    
iPcvarFreeLaser register_cvar("laser_free","0")
    
    
register_concmd("amx_laser","Concmd_Laser",ADMIN_CVAR,"<nick|@ALL> <1|0> - give/take target's laser")
    
    
register_event("DeathMsg","CmdDeath","a")
    
    
register_clcmd("say /buylaser","CmdLaserMenu")
    
register_clcmd("+laser","CmdLaser")
    
    new 
iEntity create_entity("info_target")
    
entity_set_string(iEntity,EV_SZ_classname,"EntTask_Laser")
    
entity_set_float(iEntity,EV_FL_nextthink,get_gametime() + 0.1)
    
register_think("EntTask_Laser","shot_laser")
    
    
set_task(1.0,"Check",.flags "b")
}
    
public 
plugin_precache()
{
    
g_iLaserSprite precache_model(SPRITE_LASER)
    
    for(new 
isizeof sounds_lased;i++)
        
precache_sound(sounds_lased[i])
    
    
precache_sound(sound_laseron)
    
precache_sound(sound_laseroff)
}

public 
CmdLaserMenu(id)
{
    if(
is_user_alive(id))
    {
        new 
iMenu menu_create("\yLaser Menu \w( \r/buylaser \w)","cmd_buy_laserhandler")
        
        if(!
get_pcvar_num(iPcvarFreeLaser))
        {
            if(!
BroughtLaser[id])
            {
                new 
iFormat[100]
                
formatex(iFormat,cmx(iFormat),"Buy laser \r%d$^n\d- Buy a laser for take DMG from your enemy!",get_pcvar_num(iPcvarBuyCost))
                
menu_additem(iMenu,iFormat)
            }
            else
                
menu_additem(iMenu,Laser[id] ? "Use laser \y[ON]^n\d- Lets attack they!" "Use laser \r[OFF]^n\d- We aren't assassin, right?")

        }
        else
            
menu_additem(iMenu,Laser[id] ? "Use laser \y[ON]^n\d- Lets attack they!" "Use laser \r[OFF]^n\d- We aren't assassin, right?")
            
        
menu_is_open[id] = true
            
        menu_display
(id,iMenu)
    }
    return 
PLUGIN_HANDLED
}
public 
cmd_buy_laserhandler(id,iMenu,iItem)
{
    if(!
is_user_alive(id) || iItem == MENU_EXIT)
    {
        
menu_is_open[id] = false
        menu_destroy
(iMenu)
        return 
PLUGIN_HANDLED
    
}
    
    new 
Cost get_pcvar_num(iPcvarBuyCost)
    switch(
iItem)
    {
        case 
0:
        {
            if(!
BroughtLaser[id])
            {
                if(
cs_get_user_money(id) >= Cost)
                {
                    
BroughtLaser[id] = true
                    laser_messagecolor
(id,"%s You've brought the laser!",szPrefix)
                    
client_cmd(id,"spk buttons/bell1")
                    
cs_set_user_money(id,cs_get_user_money(id) - Cost)
                    
CmdLaserMenu(id)
                }
                else
                {
                    
laser_messagecolor(id,"%s You haven't sufficient money for buy the laser!",szPrefix)
                    
client_cmd(id,"spk buttons/button10")
                    
CmdLaserMenu(id)
                }
            }
            else
            {
                
client_cmd(id,"+laser")
                
CmdLaserMenu(id)
            }
        }
    }
    
menu_destroy(iMenu)
    return 
PLUGIN_HANDLED
}
public 
CmdLaser(id)
{
    if(
is_user_alive(id))
    {
        if(!
get_pcvar_num(iPcvarFreeLaser))
        {
            if(
BroughtLaser[id])
            {
                
LaserOnOff(id)
                
CmdLaserMenu(id)
            }
            else
            {
                
console_print(id,"[Laser]: You need to buy laser for use him!")
            }
        }
        else
        {    
            
LaserOnOff(id)
        }
    }
    else
    {
        
console_print(id,"[Laser]: You need to be alive for use the laser!")
    }
}
public 
LaserOnOff(id)
{
    if(!
Laser[id])
    {
        
client_cmd(id,"stopsound")
        
client_cmd(id,"spk ^"%s^"",sound_laseron)
        
Laser[id] = true
    
}
    else
    {
        
client_cmd(id,"stopsound")
        
client_cmd(id,"spk ^"%s^"",sound_laseroff)
        
Laser[id] = false
    
}
}
public 
Concmd_Laser(idlevelcid)
{
    if (!
cmd_access(idlevelcid2))    
        return 
PLUGIN_HANDLED

    
new Target[32]
    
read_argv(1Target31)

    new 
Mode[7]
    
read_argv(2Mode6)
    
    new 
AdminName[32], UserName[32]
    
get_user_name(idAdminNamecmx(AdminName))
    
get_user_name(idUserNamecmx(AdminName))

    new 
players[32],inum,all
    
    
if(equal(Target,"@ALL"))
    {
        if(
Mode[0] == '0')
        {
            
get_players(players,inum)
            for(new 
0;i<inum;i++)
            {
                
all players[i]
                
BroughtLaser[all] = false
                Laser
[all] = false
            
}
            
laser_messagecolor(0,"%s ADMIN!t %s!y has!g taken!y Laser from!t All players",szPrefix,AdminName)
        }
        else if(
Mode[0] == '1')
        {
            
get_players(players,inum)
            for(new 
0;i<inum;i++)
            {
                
BroughtLaser[all] = true
            
}
            
laser_messagecolor(0,"%s ADMIN!t %s!y has!g given!y Laser for!t All players",szPrefix,AdminName)
        }
        else
            
console_print(id,"[Laser]: Use 1 or 0 for take/give laser from/for the target.")
    }
    else
    {
        new 
player cmd_target(idTargetCMDTARGET_NO_BOTS)
        
        if (!
player)
            return 
PLUGIN_HANDLED
            
        
if(Mode[0] == '0')
        {
            if(
BroughtLaser[player])
            {
                
BroughtLaser[player] = false
                Laser
[player] = false
                
                
if(menu_is_open[player])
                    
CmdLaserMenu(player)
            }
            
laser_messagecolor(0,"%s ADMIN!t %s!y has!g taken!y Laser from!t %s",szPrefix,AdminName,UserName)
        }
        else if(
Mode[0] == '1')
        {
            if(!
BroughtLaser[player])
            {
                
BroughtLaser[player] = true
            
}
            
laser_messagecolor(0,"%s ADMIN!t %s!y has!g given!y Laser for!t %s",szPrefix,AdminName,UserName)
        }
        else
            
console_print(id,"[Laser]: Use 1 or 0 for take/give laser from/for the target.")
        
    }
    return 
PLUGIN_HANDLED
}
public 
Check()
{
    for(new 
id 1;id <= iMaxPlayers;id++)
    {
        if(
IsUserValid(id))
        {
            if(
InimigoNoLaser[id])
            {
                if(
get_user_health(id) <= 10)
                {
                    
cs_set_user_money(UsandoLaser,clamp(cs_get_user_money(UsandoLaser) + get_pcvar_num(iPcvarBonus),0,MAX_MONEY),1)
                
                    new 
PlayerName[32],VictimName[32]
                    
get_user_name(UsandoLaser,PlayerName,charsmax(PlayerName))
                    
get_user_name(LevandoLaser,VictimName,charsmax(VictimName))
                    
laser_messagecolor(0,"%s The player!t %s!y killed !t%s!y with a laser.",szPrefix,PlayerName,VictimName)
                }
                    
                
                
message_begin(MSG_ONE_UNRELIABLEiScreenShake,_,id)
                
write_short(215<< 9)
                
write_short(10 << 9)
                
write_short(215<< 9)
                
message_end() 
                
                
message_begin(MSG_ONE_UNRELIABLE iScreenFade,_,id);
                
write_short(floatround(4096.0 0.1floatround_round));
                
write_short(floatround(4096.0 0.1floatround_round));
                
write_short(4096);
                
write_byte(0);
                
write_byte(100);
                
write_byte(200);
                
write_byte(100);
                
message_end();
                
                
client_print(id,print_center,"WARNING! GET OUT THE LASER!!!")
                
                
play_sound(id,sounds_lased[random(sizeof sounds_lased)],PITCH_LOW)
                
take_damage(idget_pcvar_num(iPcvarHealthRemove))
                
InimigoNoLaser[id] = false
            
}
        }
    }
}
public 
CmdDeath()
{
    new 
victim read_data(2)
    
Laser[victim] = false
}
public 
shot_laser(ent)
{
    static 
playertargetidbodyiOrigin[3], RGB[3]
    
    new 
iBuffer[50]
    
get_pcvar_string(iDefaultLaserColor,iBuffer,charsmax(iBuffer))

    if(
equal(iBuffer,"white"))
        
RGB = {255,255,255}
        
    else if(
equal(iBuffer,"blue"))
        
RGB = {0,0,255}
        
    else if(
equal(iBuffer,"purple"))
        
RGB = {255,0,255}
        
    else if(
equal(iBuffer,"orange"))
        
RGB = {220,80,0}
        
        
    else if(
equal(iBuffer,"yellow"))
        
RGB = {255,255,0}
        
    else if(
equal(iBuffer,"green"))
        
RGB = {0,255,0}
        
    else
        
RGB = {255,255,255}
        
    for(
player 1;player <= 32;player++)
    {
        if(!
is_user_alive(player))
            continue
            
        if((
<< get_user_weapon(player)) & INVALID_WEAPONS)
            continue
            
        if(!
Laser[player])
            continue
            
        
get_user_aiming(player,targetid,body)
        
        if(
is_user_alive(targetid))
        {
            if(
cs_get_user_team(targetid) != cs_get_user_team(player))
            {
                
RGB = {255,0,0}
                
                
InimigoNoLaser[targetid] = true
                UsandoLaser 
player
                LevandoLaser 
targetid
            
}
        }
        
get_user_origin(player,iOrigin,3)
        
message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
        
write_byte(TE_BEAMENTPOINT)
        
write_short(player 0x1000)
        
write_coordiOrigin[0] )
        
write_coordiOrigin[1] )
        
write_coordiOrigin[2] )
        
write_shortg_iLaserSprite )
        
write_byte(1)
        
write_byte(10)
        
write_byte(1)
        
write_byte(5)
        
write_byte(0)
        
write_byte(RGB[0])
        
write_byte(RGB[1])
        
write_byte(RGB[2])
        
write_byte(150)
        
write_byte(25)
        
message_end()
    }
    
entity_set_float(ent,EV_FL_nextthink,get_gametime() + 0.1)
    return 
PLUGIN_HANDLED
}
stock laser_messagecolor(const id, const input[], any:...) 
{
    new 
count 1players32 ]
    static 
msg191 ]
    
vformatmsg190input)
    
    
replace_allmsg190"!g""^4" )
    
replace_allmsg190"!y""^1" )
    
replace_allmsg190"!t""^3" )
    
    if(
idplayers] = id; else get_playersplayerscount"ch" )
    {
        for(new 
0counti++)
        {
            if( 
is_user_connectedplayers] ) )
            {
                
message_beginMSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players] )  
                
write_byteplayers] )
                
write_stringmsg )
                
message_end( )
            }
        }
    }
}
stock IsUserValid(const index)
    return (
is_user_connected(index) && is_user_alive(index) && (<= index <= iMaxPlayers) ? true false
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 11-23-2016 at 13:08.
EFFx is offline
yas17sin
Veteran Member
Join Date: Oct 2016
Location: Morocco/Sale
Old 12-21-2016 , 13:49   Re: Laser Mod v1.1
Reply With Quote #5

it's look nice i give it a try
yas17sin is offline
Send a message via ICQ to yas17sin
EFFx
Veteran Member
Join Date: Feb 2016
Location: Sγo Paulo, Brasil
Old 12-21-2016 , 18:53   Re: Laser Mod v1.1
Reply With Quote #6

Quote:
Originally Posted by yas17sin View Post
it's look nice i give it a try
Thank you. Tell me bugs if it have.

New plugin update, see the spoiler for all informations.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 12-21-2016 at 20:02.
EFFx is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 12-22-2016 , 04:42   Re: Laser Mod v1.2
Reply With Quote #7

Quote:
Originally Posted by HamletEagle View Post
Add the source code to the main post. That's a requierement for easy access.
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
EFFx
Veteran Member
Join Date: Feb 2016
Location: Sγo Paulo, Brasil
Old 12-22-2016 , 15:25   Re: Laser Mod v1.2
Reply With Quote #8

Have more than one plugins there, because it I made a zip file.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 12-22-2016 , 17:08   Re: Laser Mod v1.2
Reply With Quote #9

Laser_Mod.sma
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
EFFx
Veteran Member
Join Date: Feb 2016
Location: Sγo Paulo, Brasil
Old 12-22-2016 , 17:13   Re: Laser Mod v1.2
Reply With Quote #10

Quote:
Originally Posted by Craxor View Post
Laser_Mod.sma
I done it, can you check the plugin now?
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo
EFFx is offline
Old 12-22-2016, 17:21
Craxor
This message has been deleted by Craxor.
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 19:06.


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