Raised This Month: $ Target: $400
 0% 

Next mod in End Frag and time ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 12-28-2015 , 10:24   Next mod in End Frag and time ?
Reply With Quote #1

I want to use Hud_message in end timelimit and frage !

im used this for timelimit but im not sur :
PHP Code:
    new string[10];
         
get_cvar_string("amx_timeleft"string10);
   
         if(
equal(string"00:60"))
          {
               
set_hudmessage(25525500.00.2006.012.0)
               
show_hudmessage(0"Next Mod is %s "gamemodes[next_gamemode])
          } 
Code:
#define VERSION "1.0" #include <amxmodx> #include <nvault> new const gamemodes[ ][ ] = { "tdm", "arena", "arcade" } new cvar_count public plugin_init( ) { register_plugin( "Gamemodes changer", VERSION, "Milashkasiya" ) cvar_count = register_cvar( "gmc_count", "5" ) //set_task(0.9, "plugin_end", _, _, _, "b"); } public plugin_end( ) { new vault = nvault_open( "gmchanger" ) if( vault != INVALID_HANDLE ) {     new current_gamemode[ 8 ]     get_cvar_string( "sv_ag_gamemode", current_gamemode, charsmax(current_gamemode) )     //set_task(0.9, "check", _, _, _, "b");         new count = nvault_get( vault, current_gamemode ) + 1     if( !(count % get_pcvar_num(cvar_count)) )     {         new next_gamemode = next_gamemode_index( current_gamemode )         server_cmd( gamemodes[next_gamemode] )         server_exec( )     }         new count_str[ 8 ]     num_to_str( count, count_str, charsmax(count_str) )         nvault_set( vault, current_gamemode, count_str )     nvault_close( vault )         new string[10];          get_cvar_string("amx_timeleft", string, 10);              if(equal(string, "00:60"))           {               set_hudmessage(255, 255, 0, 0.0, 0.20, 0, 6.0, 12.0)                show_hudmessage(0, "Next Mod is %s ", gamemodes[next_gamemode])           } } } next_gamemode_index( const current[] ) { new i for( i = 0; i < sizeof gamemodes; i++ ) { if( equal(gamemodes[i], current) )     break } return ++i % sizeof gamemodes }
__________________
abdobiskra is offline
Send a message via Skype™ to abdobiskra
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 18:13.


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