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

FIx this live plugins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Runjaun
Junior Member
Join Date: Apr 2013
Old 07-16-2015 , 12:47   FIx this live plugins
Reply With Quote #1

Can any fix this?

#include <amxmodx>
#include <amxmisc>
#include <dhudmessage>

#pragma semicolon 1
#define MAX_RESTART 3
#define MAX_SONGS 20

new const PLUGIN[ ] = "Live Plugin";
new const VERSION[ ] = "1";
new const AUTHOR[ ] = "Arshad Runjaun(Credit : glut , xxxperts)";
new gDir[MAX_SONGS][32];
new file[] = "addons/amxmodx/configs/loadmusic.ini";

new num;

public plugin_precache()
{
new len, arg[32], szDir[64];
for(new i; read_file(file, i, arg, charsmax(arg),len);i++)
{

remove_quotes(arg);
copy(gDir[i], charsmax(arg), arg);
formatex(szDir, charsmax(szDir), "sound/misc/%s", gDir[i]);
num++
precache_generic(szDir);
}
}

new iXYPos;
new const Float:HUD_XY_POS[ ][ ] =
{
{ -1.0, 0.90 },
{ -1.0, 0.80 },
{ -1.0, 0.70 },
{ -1.0, 0.60 },
{ -1.0, 0.50 },
{ -1.0, 0.40 },
{ -1.0, 0.30 },
{ -1.0, 0.20 },
{ -1.0, 0.10 }
};

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" );
register_logevent( "logevent_RoundStart", 2, "1=Round_Start" );

pCvar = register_cvar( "amx_auto_live", "0" );

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( get_pcvar_num( pCvar ) && iNumRounds > 1 && !GivenLive ) {
set_task( 0.1, "NotifyGivingLive" );
set_task( 3.0, "GiveRestartRound", _, _, _, "a", MAX_RESTART );
set_task( 12.0, "ShowHUD_LiveLive" );
set_task( 19.0, "NotifyThat_LIVE" );
GivenLive = true;
}
}


public logevent_RoundStart( )
{
if( !GivenLive ) iNumRounds++;
}

public NotifyGivingLive( )
{
new rand = random(num);
client_cmd(0, "mp3 play sound/misc/%s", gDir[rand]);
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, "_____ G o o d L u c k a n d H a v e F u n !_____ " );
}

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

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

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.4, 0.2, 0.3, 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( 0.1, "NotifyGivingLive" );
set_task( 3.0, "GiveRestartRound", _, _, _, "a", MAX_RESTART );
set_task( 12.0, "ShowHUD_LiveLive" );
set_task( 19.0, "NotifyThat_LIVE" );
GivenLive = true;

return PLUGIN_CONTINUE;
}


Customlive.sma(27) : error 001: expected token: ";", but found "-identifier-"

1 Error.
Could not locate output file Customlive.amx (compile failed).



Thanks in Advance

Last edited by Runjaun; 07-16-2015 at 12:48.
Runjaun is offline
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 07-16-2015 , 13:22   Re: FIx this live plugins
Reply With Quote #2

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

#pragma semicolon 1
#define MAX_RESTART 3
#define MAX_SONGS 20

new const PLUGIN[ ] = "Live Plugin";
new const 
VERSION[ ] = "1";
new const 
AUTHOR[ ] = "Arshad Runjaun(Credit : glut , xxxperts)";
new 
gDir[MAX_SONGS][32];
new 
file[] = "addons/amxmodx/configs/loadmusic.ini";

new 
num;

public 
plugin_precache()
{
    new 
lenarg[32], szDir[64];
    for(new 
iread_file(fileiargcharsmax(arg),len);i++)
    {
        
        
remove_quotes(arg);
        
copy(gDir[i], charsmax(arg), arg);
        
formatex(szDircharsmax(szDir), "sound/misc/%s"gDir[i]);
        
num++;
        
        
precache_generic(szDir);
    }
}

new 
iXYPos;
new const 
Float:HUD_XY_POS[ ][ ] =
{
{ -
1.00.90 },
{ -
1.00.80 },
{ -
1.00.70 },
{ -
1.00.60 },
{ -
1.00.50 },
{ -
1.00.40 },
{ -
1.00.30 },
{ -
1.00.20 },
{ -
1.00.10 }
};

new 
pCvar;
new 
iNumRoundsbool:GivenLive false;

public 
plugin_init( )
{
register_pluginPLUGINVERSIONAUTHOR );

register_event"HLTV""Event_NewRound""a""1=0""2=0" );
register_logevent"logevent_RoundStart"2"1=Round_Start" );

pCvar register_cvar"amx_auto_live""0" );

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( 
get_pcvar_numpCvar ) && iNumRounds && !GivenLive ) {
    
set_task0.1"NotifyGivingLive" );
    
set_task3.0"GiveRestartRound"___"a"MAX_RESTART );
    
set_task12.0"ShowHUD_LiveLive" );
    
set_task19.0"NotifyThat_LIVE" );
    
GivenLive true;
}
}


public 
logevent_RoundStart( )
{
if( !
GivenLive iNumRounds++;
}

public 
NotifyGivingLive( )
{
new 
rand random(num);
client_cmd(0"mp3 play sound/misc/%s"gDir[rand]);
set_dhudmessage01600, -1.00.4401.03.00.20.3false );
show_dhudmessage0"____________LIVE AFTER 3 RESTARTS____________" );
}

public 
NotifyThat_LIVE( )
{
set_dhudmessage01600, -1.00.4401.03.00.20.3false );
show_dhudmessage0"_____ G o o d L u c k a n d H a v e F u n !_____ " );
}

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

public 
ShowHUD_LiveLive( )
{
set_task0.2"HUD_LiveLive"___"a"sizeofHUD_XY_POS ) * );
}

public 
HUD_LiveLiveindex )
{
if( 
iXYPos >= sizeofHUD_XY_POS ) ) iXYPos 0;
set_dhudmessagerandom_num0255 ), random_num0255 ), random_num0255 ), HUD_XY_POSiXYPos ][ ], HUD_XY_POSiXYPos ][ ], 050.00.40.20.3false );
show_dhudmessageindex"[ L I V E ] [ L I V E ] [ L I V E ]" );
iXYPos++;
}

public 
cmd_liveindexlevelcid )
{
if( !
cmd_accessindexlevelcid) ) return PLUGIN_CONTINUE;

iXYPos 0GivenLive true;
set_task0.1"NotifyGivingLive" );
set_task3.0"GiveRestartRound"___"a"MAX_RESTART );
set_task12.0"ShowHUD_LiveLive" );
set_task19.0"NotifyThat_LIVE" );
GivenLive true;

return 
PLUGIN_CONTINUE;

try this , its compiling

u missed semicolon here
PHP Code:
num++ 

Last edited by tousif; 07-16-2015 at 13:23.
tousif is offline
Runjaun
Junior Member
Join Date: Apr 2013
Old 07-16-2015 , 21:38   Re: FIx this live plugins
Reply With Quote #3

Thanks

Last edited by Runjaun; 07-16-2015 at 21:40.
Runjaun is offline
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 23:34.


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