Advertisement
ColdWar-Pawn

Timeleft On Spawn

Apr 6th, 2013
398
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.59 KB | None | 0 0
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include < amxmodx >
  4. #include < hamsandwich >
  5.  
  6. public plugin_init()
  7. {
  8.     register_plugin( "Timeleft On Spawn", "v1.0", "+ColdWar" )
  9.     RegisterHam( Ham_Spawn, "player", "Ham_PlayerSpawn_Post", 1 );
  10. }
  11.  
  12. public Ham_PlayerSpawn_Post( client )
  13. {
  14.     if( !is_user_connected( client ) || !is_user_alive( client ) )
  15.         return HAM_IGNORED;
  16.    
  17.     new timeleft = get_timeleft( );
  18.    
  19.     new minutes = timeleft / 60;
  20.     new seconds = timeleft % 60;
  21.    
  22.     client_print( client, print_chat, "[AMXX] Timeleft until restart - %i:%i", minutes, seconds );
  23.    
  24.     return HAM_IGNORED;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement