maxiKINGdavid 0 Odesláno: 22. Únor, 2013 Share Odesláno: 22. Únor, 2013 Prosim vas chcel by som vediet ako urobit filescript pripadne zohnat nejaky ktory bude zobrazovat automaticke spravy ako announce Announce je to co sa nezobrazuje v chate ale ako pismena na obrazovke v preklade to znamena oznamenie Link to comment Share on other sites More sharing options...
0 maxiKINGdavid 0 Odesláno: 22. Únor, 2013 Author Share Odesláno: 22. Únor, 2013 Nechapem Co tam ma upravit Link to comment Share on other sites More sharing options...
0 Rad012 23 Odesláno: 22. Únor, 2013 Share Odesláno: 22. Únor, 2013 v scripte treba zmeniť SendClientMessageToAll(-1,str); na GameTextForAll(str, 5000, 4); Link to comment Share on other sites More sharing options...
0 maxiKINGdavid 0 Odesláno: 22. Únor, 2013 Author Share Odesláno: 22. Únor, 2013 To je vsetko mozem to loadnut? ci treba nieco pripisat aj v server.cfg? Link to comment Share on other sites More sharing options...
0 Rad012 23 Odesláno: 22. Únor, 2013 Share Odesláno: 22. Únor, 2013 keď si to dal do módu (a máš mod v server.cfg) tak nie pokial FS tak isto...hlavne vytvor zložku v scriptfiles a dopíš čo chceš posielať Link to comment Share on other sites More sharing options...
0 maxiKINGdavid 0 Odesláno: 23. Únor, 2013 Author Share Odesláno: 23. Únor, 2013 #include <a_samp> #define SUBOR "Reklamy.txt" #define TIMER 180 #define SEC(%0) %0*1000 //#define DEBUG forward SendRandomMessage(); public OnFilterScriptInit() { if(!fexist(SUBOR)){ print( "============= Reklama System v1.0 by QWER ============="); printf("Súbor \"%s\" sa nenašiel. Server bol vypnutý !",SUBOR); SendRconCommand("exit"); }else{ print( "============= Reklama System v1.0 by QWER ============="); print("Súbor sa našiel, všetko OK !"); } SetTimer("SendRandomMessage",SEC(TIMER),true); return 1; } public SendRandomMessage(){ new File:a = fopen(SUBOR,io_read); new b,str[128]; while(fread(a,str)){ b++; } if(b == 0){ print( "============= Reklama System v1.0 by QWER ============="); printf("Súbor \"%s\" je prázdny (Chýbajú tam reklamy). Server bol vypnutý !",SUBOR); SendRconCommand("exit"); } new r = random( +1; b = 0; fclose(a); a = fopen(SUBOR,io_read); while(fread(a,str)){ if(b == r) { DelChar(str); #if defined DEBUG print(str); #endif GameTextForAll(str, 5000, 4); break; } b++; } fclose(a); } stock DelChar(tstring[]) { new ln = strlen(tstring); if(tstring[ln-2] == '\r')tstring[ln-2] = '\0'; if(tstring[ln-1] == '\n')tstring[ln-1] = '\0'; } Je vsetk0 spravne? + ako sa ma volat ten subor vo scriptfiles? Link to comment Share on other sites More sharing options...
0 maxiKINGdavid 0 Odesláno: 24. Únor, 2013 Author Share Odesláno: 24. Únor, 2013 Nemohli by ste mi spisat nejaky navod pretoze mam v tom zmatok PLS Nemohli by ste mi spisat nejaky navod pretoze mam v tom zmatok PLS Co mam vlastne robit s tym textom? Link to comment Share on other sites More sharing options...
0 maxiKINGdavid 0 Odesláno: 25. Únor, 2013 Author Share Odesláno: 25. Únor, 2013 v scripte treba zmeniť SendClientMessageToAll(-1,str); na GameTextForAll(str, 5000, 4); NAOZAJ je to vsetko co treba zmenit pretoze [18:46:38] Loading filterscript 'reklama.amx'... [18:46:38] ============= Reklama System v1.0 by QWER ============= [18:46:38] Súbor sa našiel, všetko OK ! Ale reklamy sa nezobrazuju a v Reklamy.txt mam iba prvy riadok a v nom toto: prajeme prijemne hranie na nasich serveroch Link to comment Share on other sites More sharing options...
Dotaz
maxiKINGdavid 0
Prosim vas chcel by som vediet ako urobit filescript pripadne zohnat nejaky ktory bude zobrazovat automaticke spravy ako announce
Announce je to co sa nezobrazuje v chate ale ako pismena na obrazovke v preklade to znamena oznamenie
Link to comment
Share on other sites
7 odpovědí na tuto otázku
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now