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

Scripting for live plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Pawangond
Member
Join Date: Jul 2016
Location: In Your Heart
Old 02-26-2017 , 01:51   Scripting for live plugin
Reply With Quote #1

Someone gave me a code for live plugin , but as you can see #include dhudmessage there is nothing like dhudmessage in include folder !
I am not a coder so i don't know how to modify it ! if someone can do that for me it would be great

All i am saying is a live plugin which works when server is restarted or map is changed or when admin types /live ! and 3 restarts>>live message>>knife match >> normal rounds !

Knife codiing is not included in this and if not possible its okay !

Code:
#include < amxmodx > 
#include < amxmisc > 
#include < dhudmessage > 

#pragma semicolon    1 

const MAX_RESTART = 2; 

new const PLUGIN[ ]        =    "Live Plugin"; 
new const VERSION[ ]        =    "1.0"; 
new const AUTHOR[ ]        =    "ZOF 'X"; 

new iXYPos; 
new const Float:HUD_XY_POS[ ][ ] = 
{ 
    { -1.0, 0.98 }, 
    { -1.0, 0.91 }, 
    { -1.0, 0.84 }, 
    { -1.0, 0.77 }, 
    { -1.0, 0.70 }, 
    { -1.0, 0.63 }, 
    { -1.0, 0.56 }, 
    { -1.0, 0.49 }, 
    { -1.0, 0.42 }, 
    { -1.0, 0.35 }, 
    { -1.0, 0.28 }, 
    { -1.0, 0.21 }, 
    { -1.0, 0.14 }, 
    { -1.0, 0.07 }, 
    { -1.0, 0.00 } 
}; 

new pCvar; 
new iNumRounds, bool:GivenLive = false; 

public plugin_init( ) 
{ 
    register_plugin( PLUGIN, VERSION, AUTHOR ); 
     
    register_event( "HLTV", "Event_NewRound", "a", "1=0", "2=0" ); 
     
    pCvar = register_cvar( "amx_auto_live", "1" ); 
     
    register_clcmd( "say /live", "cmd_live", ADMIN_KICK ); 
    register_clcmd( "say_team /live", "cmd_live", ADMIN_KICK ); 
     
    register_clcmd( "say .live", "cmd_live", ADMIN_KICK ); 
    register_clcmd( "say_team .live", "cmd_live", ADMIN_KICK ); 
} 

public Event_NewRound( ) 
{ 
    if( !GivenLive ) iNumRounds++; 
    if( get_pcvar_num( pCvar ) && iNumRounds > 1 && !GivenLive ) { 
        set_task( 00.01, "NotifyGivingLive" ); 
        set_task( 03.00, "GiveRestartRound", _, _, _, "a", MAX_RESTART ); 
        set_task( 09.00, "ShowHUD_LiveLive" ); 
        set_task( 16.00, "GiveRestartRound" ); 
        set_task( 18.00, "NotifyThat_LIVE" ); 
        GivenLive = true; 
    } 
} 

public NotifyGivingLive( ) 
{ 
    set_dhudmessage( 0, 160, 0, -1.0, 0.44, 0, 1.0, 3.0, 0.2, 0.3, false ); 
    show_dhudmessage( 0, "____________LIVE AFTER 3 RESTARTS____________" ); 
} 

public NotifyThat_LIVE( ) 
{ 
    set_dhudmessage( 0, 160, 0, -1.0, 0.44, 0, 1.0, 3.0, 0.2, 0.3, false ); 
    show_dhudmessage( 0, "____________Its LIVE GO GO GO____________" ); 
} 

public GiveRestartRound( ) 
{ 
    server_cmd( "sv_restartround ^"1^"" ); 
} 

public ShowHUD_LiveLive( ) 
{ 
    set_task( 0.2, "HUD_LiveLive", _, _, _, "a", sizeof( HUD_XY_POS ) * 2 ); 
} 

public HUD_LiveLive( index ) 
{ 
    if( iXYPos >= sizeof( HUD_XY_POS ) ) iXYPos = 0; 
    set_dhudmessage( random_num( 0, 255 ), random_num( 0, 255 ), random_num( 0, 255 ), HUD_XY_POS[ iXYPos ][ 0 ], HUD_XY_POS[ iXYPos ][ 1 ], 0, 50.0, 0.3, 0.4, 0.4, false ); 
    show_dhudmessage( index, "[   L   I   V   E   ]          [   L   I   V   E   ]             [   L   I   V   E   ]" ); 
    iXYPos++; 
} 

public cmd_live( index, level, cid ) 
{ 
    if( !cmd_access( index, level, cid, 0 ) ) return PLUGIN_CONTINUE; 
     
    iXYPos = 0; GivenLive = true; 
    set_task( 00.01, "NotifyGivingLive" ); 
    set_task( 03.00, "GiveRestartRound", _, _, _, "a", MAX_RESTART ); 
    set_task( 09.00, "ShowHUD_LiveLive" ); 
    set_task( 16.00, "GiveRestartRound" ); 
    set_task( 18.00, "NotifyThat_LIVE" ); 
    GivenLive = true; 
     
    return PLUGIN_CONTINUE; 
}
Pawangond is offline
SomewhereLost
AlliedModders Donor
Join Date: Mar 2014
Location: Tomorrowland
Old 02-26-2017 , 01:59   Re: Scripting for live plugin
Reply With Quote #2

Can't understand what youre trying to say..
__________________
SomewhereLost is offline
Send a message via Skype™ to SomewhereLost
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-26-2017 , 08:39   Re: Scripting for live plugin
Reply With Quote #3

Then download it maybe?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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 13:59.


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