AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   New Plugin Submissions (https://forums.alliedmods.net/forumdisplay.php?f=26)
-   -   [Funny] Restart Harlem Shake (https://forums.alliedmods.net/showthread.php?t=288671)

EFFx 10-07-2016 21:07

Re: [Funny] Restart Harlem Shake
 
This video is old, now i have a microphone :D

Not exactly you need use this plugin at map starts. You can do it using another plugin, example is a MAX Rounds. I give an plugin like this for my friend. When the rounds arrives 80 , the plugin exec amx_restart_hs. Its a funny restart, i think i will edit for use just 1x per map, what you think?

rjsandy11 11-12-2016 14:41

Re: [Funny] Restart Harlem Shake
 
hey man ur plugin is awsome bt can u make one with command /live instead of amx_restart ........thanks in advance

EFFx 11-12-2016 17:07

Re: [Funny] Restart Harlem Shake
 
There's
PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <hamsandwich>
#include <dhudmessage>

#define PLUGIN "Restart Harlem Shake"
#define VERSION "1.0"
#define AUTHOR "EFFx"

#define PrefixName "!g[RRHarlemShake]!y:"

new iScreenFade,iScreenShake

new const HarlemSound[] = "HarlemShake/harlemsound.wav"

new const g_szSound[][] = 

    
"",
    
"fvox/one",
    
"fvox/two",
    
"fvox/three",
    
"fvox/four",
    
"fvox/five",
    
"fvox/six",
    
"fvox/seven",
    
"fvox/eight",
    
"fvox/nine",
    
"fvox/ten" 
}

new 
bool:isRRHarlemRunning
new SyncHuds

new CountDownTime 10
new iLightsCountDown

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
SyncHuds CreateHudSyncObj()
    
iScreenFade get_user_msgid("ScreenFade")
    
iScreenShake get_user_msgid("ScreenShake")
    
    
RegisterHamHam_TakeDamage"player""OnTakingDamage" )
        
    
register_clcmd("kill","BlockKillCmd")
        
    
register_clcmd("say /live","ShowHs")
}
public 
plugin_precache()
{
    
precache_sound(HarlemSound)
}
public 
OnTakingDamage(id,victim)
{
    if(
isRRHarlemRunning)
        return 
HAM_SUPERCEDE
        
    
return HAM_IGNORED
}
public 
BlockKillCmd(id)
{
    if(
isRRHarlemRunning)
    {
        
console_print(id,"[%s]: The %s is running. You cannot do it right now.",PLUGIN,PLUGIN)
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_CONTINUE
}
public 
ShowHs(id)
{
    if(
get_user_flags(id) & ADMIN_BAN)
    {
        new 
iAdminNick[32]
        
get_user_name(id,iAdminNick,charsmax(iAdminNick))
        
        
isRRHarlemRunning true
        
        rr_chatcolor
(0,"ADMIN!g %s!y has used the !g%s",iAdminNick,PLUGIN)
        
set_task(1.0,"HudCountDownForStartHS",_,_,_,"a",10)
        
        new 
iPlayers[32],iNum,id
        get_players
(iPlayers,iNum,"ch")
        for(new 
i;iNum;i++)
        {
            
id iPlayers[i]
            if(!
is_user_alive(id))
            {
                
ExecuteHam(Ham_CS_RoundRespawn,id)
            }
        }
    }
    else
    {
        
rr_chatcolor(id,"You have not access to this command!")
    }
    return 
PLUGIN_HANDLED
}
public 
HudCountDownForStartHS()
{
    
set_hudmessage(255,255,255, -1.00.300,1.00.5)
    
ShowSyncHudMsg(0,SyncHuds,"RESTART HARLEM SHAKE^n[ %d ]",CountDownTime)
    
    
message_begin(MSG_BROADCASTiScreenShake)
    
write_short(215<< 9)
    
write_short(10 << 9)
    
write_short(215<< 9)
    
message_end() 
    
    
client_cmd(0"spk %s"g_szSound[CountDownTime--]);
    
    if(
CountDownTime == 4)
        
StartLights()
        
    else if(
CountDownTime == 0)
    {
        
set_task(1.0,"StartMusic")
        
set_task(1.0,"ConLoTr")
        
CountDownTime 10
    
}
        
}
public 
StartLights()
{
    switch(
iLightsCountDown)
    {
        case 
0:
        {
            
set_lights("e")
            
set_task(1.0,"StartLights")
        }
        case 
1:
        {
            
set_lights("d")
            
set_task(1.0,"StartLights")
        }
        case 
2:
        {
            
set_lights("c")
            
set_task(1.0,"StartLights")
        }
        case 
3:
        {
            
set_lights("b")
            
set_task(1.0,"StartLights")
        }
        case 
4:
        {
            
set_lights("a")
            
iLightsCountDown 0
        
}
    }
    
iLightsCountDown++
}
public 
StartMusic()
{
    
client_cmd(0,"spk ^"%s^"",HarlemSound)
    
set_lights("m")
    
    
set_task(0.5,"ScreenShake",_,_,_,"a",65)
    
set_task(0.4,"Fade",_,_,_,"a",80)
    
set_task(15.4,"StartCrazy")
}
public 
Fade()
{
    
message_begin(MSG_BROADCAST iScreenFade);
    
write_short3<<);
    
write_short3<<);
    
write_short3<<);
    
write_byte(0);
    
write_byte(0);
    
write_byte(0);
    
write_byte(255);
    
message_end();
}
public 
ScreenShake()
{
    
message_begin(MSG_BROADCASTiScreenShake)
    
write_short(215<< 10)
    
write_short(10 << 10)
    
write_short(215<< 10)
    
message_end() 
}
public 
StartCrazy()
{
    
set_task(0.1,"crazy",_,_,_,"a",125)
    
set_task(18.0,"RestartTheRound")
}
public 
crazy()
{
    new 
iPlayers[32],iNum,id
    get_players
(iPlayers,iNum,"ch")
    for(new 
i;iNum;i++)
    {
        
id iPlayers[i]
        
        new 
Float:fVec[3];
        
fVec[0] = random_float(0.0255.0);
        
fVec[1] = random_float(0.0255.0);
        
fVec[2] = random_float(0.0255.0);
        
        
entity_set_vector(id EV_VEC_punchangle fVec);
    }
    
message_begin(MSG_BROADCAST iScreenFade);
    
write_short1<<10 );
    
write_short1<<10 );
    
write_short1<<12 );
    
write_byterandom_num(0,255) );
    
write_byterandom_num(0,255) );
    
write_byterandom_num(0,255) );
    
write_byte95 );
    
message_end();
}
public 
RestartTheRound() 
{
    
log_to_file("RestartHarlemShake.log","[%s]: Restart Harlem Shake executed with success!",PLUGIN)
    
server_cmd("sv_restart 1")
    
    
isRRHarlemRunning false
}
public 
ConLoTr()
{
    
set_dhudmessage(0,100,200,-1.0,0.20,0,1.0,0.5)
    
show_dhudmessage(0,"CON LO TERRORISTA!")
    
    
set_task(2.0,"StartTa")
    
set_task(3.5,"StartTa2")
    
set_task(5.5,"StartTa3")
    
set_task(7.0,"StartTa")
    
set_task(8.5,"StartTa2")
    
set_task(9.5,"StartTa3")
    
set_task(10.3,"StartTa")
    
set_task(11.3,"StartTa2")
    
set_task(11.9,"StartTa3")
    
set_task(12.2,"StartTa")
    
set_task(12.8,"StartTa2")
    
set_task(13.2,"StartTa3")
    
set_task(13.8,"StartTa")
    
set_task(14.1,"StartTa2")
    
set_task(14.8,"LetsDo")
    
set_task(21.5,"Hey")
    
set_task(26.0,"ConLoTr2")
    
set_task(28.4,"WRHOOOOOO")
}
public 
StartTa()
{
    
set_dhudmessage(0,100,200,-1.0,0.20,0,1.0,0.1)
    
show_dhudmessage(0,"TAH!")
}
public 
StartTa2()
{
    
set_dhudmessage(0,100,200,-1.0,0.25,0,1.0,0.1)
    
show_dhudmessage(0,"TAH!")
}
public 
StartTa3()
{
    
set_dhudmessage(0,100,200,-1.0,0.30,0,1.0,0.1)
    
show_dhudmessage(0,"TAH!")
}

public 
LetsDo()
{
    
set_dhudmessage(0,100,200,-1.0,0.20,0,1.0,0.1)
    
show_dhudmessage(0,"LETS DO THE HARLEM SHAKE!")
}

public 
Hey()
{
    
set_dhudmessage(0,100,200,-1.0,0.20,0,1.0,0.1)
    
show_dhudmessage(0,"HEY!")
}

public 
ConLoTr2()
{
    
set_dhudmessage(0,100,200,-1.0,0.20,0,1.0,0.1)
    
show_dhudmessage(0,"CON LO TERRORISTA!")
}

public 
WRHOOOOOO()
{
    
set_dhudmessage(0,100,200,-1.0,0.20,0,1.0,0.1)
    
show_dhudmessage(0,"WRAOOOOOOOOOOOH!")
}

stock rr_chatcolor(const id, const input[], any:...) 
{
    new 
count 1players32 ]
    static 
msg191 ]
    
vformatmsg190input)
    
format(msg,sizeof msg,"%s %s",PrefixName,msg)
    
    
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( )
            }
        }
    }



rjsandy11 11-12-2016 23:15

Re: [Funny] Restart Harlem Shake
 
wow thanks aton mate :D:)

EFFx 11-12-2016 23:29

Re: [Funny] Restart Harlem Shake
 
You'r welcome.

EFFx 11-23-2016 13:06

Re: [Funny] Restart Harlem Shake
 
Plugin updated:

Spoiler

Mistrick 11-24-2016 05:47

Re: [Funny] Restart Harlem Shake
 
You can make this func like that, not tested but should work.
PHP Code:

public fn_Messages()
{
    new 
iMsg[50]
    
    new 
msg[][] = { "TAH!""LETS DO THE HARLEM SHAKE""HEY!""CON LO TERRORISTA!""WRAOOOOOOOOOOOH!" };
    new 
Float:times[] = { 1.52.01.51.01.20.81.00.60.30.60.40.60.37.44.02.5 };
    
    
formatex(iMsg,charsmax(iMsg), tas 13 msg[0] : msg[tas 12]);
    
    if(
tas 16)
    {
        
set_task(times[tas], "fn_Messages");
    }
    
    
set_dhudmessage(0,100,200,-1.0,0.20,0,1.0,0.1)
    
show_dhudmessage0iMsg )
    
    
tas++;



EFFx 11-24-2016 17:33

Re: [Funny] Restart Harlem Shake
 
Yes, it works, plugin updated.

yas17sin 01-16-2017 09:25

Re: [Funny] Restart Harlem Shake
 
nice plugin i like it it's a very nice restart keep good working :)

But there is some problem i found it in the logs :

Spoiler


i have some suggestion you may have add vote for restart so if there is no admin online the normal player can make a vote for a harlm shake restart
thats could be good for normal player that doesn't have any flags

Napoleon_be 01-16-2017 10:41

Re: [Funny] Restart Harlem Shake
 
In order for anyone to help you, you must enable debug... Just simply type debug behind the plugin name in plugins.ini


All times are GMT -4. The time now is 16:00.

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