Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 3rd, 2012  |  syntax: None  |  size: 1.49 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include < amxmisc >
  2. #include < hamsandwich >
  3. #include < fakemeta >
  4. new bool:Simon[ 33 ]
  5. new bool:eAllowed
  6. public plugin_init()  
  7. {
  8.     register_plugin( "Simon", "1.0", "ASDFA" )
  9.      
  10.     register_clcmd( "say /simon", "ClCmd_Simon" )
  11.      
  12.     register_logevent( "eRound_Start", 2, "1=Round_Start" )
  13.      
  14.     RegisterHam( Ham_Killed, "player", "eDeath" )
  15.      
  16. }
  17. public ClCmd_Simon( id )
  18. {
  19.     if( get_pdata_int( id, 114 ) == 2 )
  20.     {
  21.         if( is_user_alive( id ) )
  22.         {
  23.             if( eAllowed )
  24.             {
  25.                 Simon[ id ] = true
  26.                 eAllowed = false
  27.                 client_print( id, print_chat, "Jestes prowadzacym straznikiem." )
  28.             }
  29.             else client_print( id, print_chat, "Ktos inny juz wybral prowadzenie." )
  30.         }
  31.         else client_print( id, print_chat, "Musisz zyc aby wziac prowadzenie." )
  32.     }
  33.     else client_print( id, print_chat, "Tylko klawisze moga wziac prowadzenie." )
  34. }
  35. public eDeath( id )
  36. {
  37.     if( Simon[ id ] )
  38.     {
  39.         Simon[ id ] = !Simon[ id ]
  40.     }
  41. }
  42. public eRound_Start()
  43. {
  44.     new iPlayers[ 32 ], iNum
  45.     get_players( iPlayers, iNum )
  46.     for( new i; i < iNum; i++ )
  47.     {
  48.         Simon[ iPlayers[ i ] ] = false
  49.     }
  50.     eAllowed = true
  51. }
  52. public plugin_natives()
  53. {
  54.     register_library( "Simon" )
  55.     register_native( "is_user_simon", "_simon" )
  56. }
  57. public _simon( plugin, params )
  58. {
  59.     return Simon[ get_param( 1 ) ]
  60. }