AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Next mod in End Frag and time ? (https://forums.alliedmods.net/showthread.php?t=276801)

abdobiskra 12-28-2015 10:24

Next mod in End Frag and time ?
 
I want to use Hud_message in end timelimit and frage !

im used this for timelimit but im not sur :bee::
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 }


All times are GMT -4. The time now is 18:13.

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