MegastoRM

mdb_cs_v3

Jun 11th, 2012
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.54 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <cstrike>
  3. #include <colorchat>
  4.  
  5. new pcvar_reklama
  6. new bool:reklama[ 33 ] = true
  7.  
  8. public plugin_init() {
  9.     register_plugin( "Mdb CS", "1.1b", "MegasToRM" )   
  10.     pcvar_reklama = register_cvar("mdb_download","180")
  11.     set_task(get_pcvar_float(pcvar_reklama),"advert",_,_,_,"b")
  12.    
  13.     register_clcmd("say /csfull","pocetak")
  14.     register_clcmd("say_team /csfull","pocetak")
  15.    
  16.     register_concmd("cs_download 0", "stopiraj");
  17.    
  18. }
  19. public pocetak(id)
  20. {
  21.     new nick[ 32 ]
  22.     get_user_name( id, nick,31 )
  23.     ColorChat(0,GREEN,"^4[MDB CS]^3 %s^1 je poceo da skida MDB CS.Da ga i ti skines, say ^3 /csfull",nick)
  24.    
  25.     set_task( 0.1, "dloadcs" ,id )
  26. }
  27.  
  28. public client_disconnect(id)
  29. {
  30.     reklama[id] = false
  31. }
  32.  
  33. public dloadcs(id)
  34. {
  35.     show_motd( id, "http://mdb-hosting.com/csfull/" )
  36.     reklama[id] = false
  37. }
  38. public client_connect(id)
  39. {
  40.     set_task(5.0,"reklamiraj")
  41. }
  42. public client_putinserver(id)
  43. {
  44.     reklama[id] = true
  45.     set_task(1.0, "reklamiraj")
  46. }
  47.  
  48.  
  49. public reklamirajcs(id)
  50. {
  51.     reklama[id] = true
  52. }
  53.  
  54. public stopiraj(id){
  55.     reklama[id] = false
  56.    
  57. }
  58.    
  59. public reklamiraj(id)
  60. {
  61.     ColorChat( id,TEAM_COLOR,"^4[MDB CS]^1 Da skines ^4 MDB CS ^1say ^3 /csfull" )
  62.    
  63. }
  64.  
  65. public advert()
  66. {
  67.     new iPlayers[ 32 ], iNum, id
  68.     get_players( iPlayers, iNum )
  69.     for ( new i; i < iNum; i++ )
  70.     {
  71.         id = iPlayers[ i ]
  72.         if ( is_user_connected(id) )
  73.         {
  74.             if(reklama[id] == true)
  75.             {
  76.                 reklamiraj(id)
  77.             }
  78.             else if( reklama[id] == false )
  79.             {
  80.                 return PLUGIN_HANDLED
  81.             }
  82.            
  83.         }
  84.     }
  85.     return PLUGIN_HANDLED
  86. }
Advertisement
Add Comment
Please, Sign In to add comment