Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <cstrike>
- #include <colorchat>
- new pcvar_reklama
- new bool:reklama[ 33 ] = true
- public plugin_init() {
- register_plugin( "Mdb CS", "1.1b", "MegasToRM" )
- pcvar_reklama = register_cvar("mdb_download","180")
- set_task(get_pcvar_float(pcvar_reklama),"advert",_,_,_,"b")
- register_clcmd("say /csfull","pocetak")
- register_clcmd("say_team /csfull","pocetak")
- register_concmd("cs_download 0", "stopiraj");
- }
- public pocetak(id)
- {
- new nick[ 32 ]
- get_user_name( id, nick,31 )
- ColorChat(0,GREEN,"^4[MDB CS]^3 %s^1 je poceo da skida MDB CS.Da ga i ti skines, say ^3 /csfull",nick)
- set_task( 0.1, "dloadcs" ,id )
- }
- public client_disconnect(id)
- {
- reklama[id] = false
- }
- public dloadcs(id)
- {
- show_motd( id, "http://mdb-hosting.com/csfull/" )
- reklama[id] = false
- }
- public client_connect(id)
- {
- set_task(5.0,"reklamiraj")
- }
- public client_putinserver(id)
- {
- reklama[id] = true
- set_task(1.0, "reklamiraj")
- }
- public reklamirajcs(id)
- {
- reklama[id] = true
- }
- public stopiraj(id){
- reklama[id] = false
- }
- public reklamiraj(id)
- {
- ColorChat( id,TEAM_COLOR,"^4[MDB CS]^1 Da skines ^4 MDB CS ^1say ^3 /csfull" )
- }
- public advert()
- {
- new iPlayers[ 32 ], iNum, id
- get_players( iPlayers, iNum )
- for ( new i; i < iNum; i++ )
- {
- id = iPlayers[ i ]
- if ( is_user_connected(id) )
- {
- if(reklama[id] == true)
- {
- reklamiraj(id)
- }
- else if( reklama[id] == false )
- {
- return PLUGIN_HANDLED
- }
- }
- }
- return PLUGIN_HANDLED
- }
Advertisement
Add Comment
Please, Sign In to add comment