Guest [BJ]boban88 Odesláno: 3. Říjen, 2010 Share Odesláno: 3. Říjen, 2010 dám sem TUT na report pretože ten čo tu je je chybní napriklad vzdy to nahlasi iba ID 0 aj ked napisete id a este to aj prepisuje v zlozke takze niekto napise report zapise sa ale ked niekto napise este raz tak to prepise existujuce proste cele zle. takže idem nato: niekam hore: #define SCM SendClientMessage//ulachcime si pisanie #define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1 dalej dáme do publicu OnPlayerCommandText dcmd(report,6,cmdtext); tak a teraz prejdeme na samotný príkaz niekam dole alebo hocikam len ne do žiadneho publicu dcmd_report(playerid, params[]){ new dvd; new File:reportf=fopen("report.txt", io_append );//cele toto je vytvorenie zlozky v scriptfiles z nazvom report.txt if(!params[0] || !(dvd = chrfind(' ', params) + 1) || !params[dvd]) return SCM(playerid,0xFF0000AA, "/report [ ID ] [ DOVOD ]");//v prípade že zadal nesprávne príkaz if(strlen(params[dvd]) > 24) return SCM(playerid,0xFF0000AA,"prilis dlhy dovod");//ak je dovod prilis dlhy new hlaseny = strval(params); if(!IsPlayerConnected(hlaseny)) return SCM(playerid,0xFF0000AA,"toto ID nieje pripojene");//ak ID ktore napisal do prikazu nieje v tom case pripojene new string[128]; format(string, 128, "Hráč [ %s ] nahlásil hráča [ %s ] dôvod [%s]", PlayerName(playerid),PlayerName(hlaseny), params[dvd]);//sprava ktorá sa napise do chatu ale aj do nasho suboru report.txt SendClientMessageToAll(0xFF0000AA,string); print(string);//toto nieje potrebne ja to tam mam len tak ide oto ze vam to napise aj do serverlogu fwrite(reportf, string);//znamena ze nam to zapise do nasho suboru fclose(reportf);//po zapisani subor uzavrie return 1;//vratime hodnotu }//ukoncime prikaz ak by to pisalo undefined symbol chrfind tak medti stocky si dajte : chrfind(n,h[],s=0) { new l=strlen(h); while(s { if(h[s]==n) return s;s++; } return -1; } alebo undefined symbol PlayerName tak dalsi stock stock PlayerName(playerid){ new name[MAX_PLAYER_NAME]; if(IsPlayerConnected(playerid)) GetPlayerName(playerid, name, MAX_PLAYER_NAME); return name; } ak este nieco tak napiste a este HELP som nekukal mozno to tam je ak ano tak sry nieje to odnikial okopirovane robil som to sam !!! Link to comment Share on other sites More sharing options...
Mischino19 2 Odesláno: 3. Říjen, 2010 Share Odesláno: 3. Říjen, 2010 viewtopic.php?f=8&t=8183&hilit=report Link to comment Share on other sites More sharing options...
Guest [BJ]boban88 Odesláno: 3. Říjen, 2010 Share Odesláno: 3. Říjen, 2010 http://pawno.cz/viewtopic.php?f=8&t=8183&hilit=report to je ten co som spominal ze je chybní Link to comment Share on other sites More sharing options...
NurofeN-Cz 0 Odesláno: 3. Říjen, 2010 Share Odesláno: 3. Říjen, 2010 Hm.. 5/10 Mozna pouziju.. Link to comment Share on other sites More sharing options...
Sweet 7 Odesláno: 3. Říjen, 2010 Share Odesláno: 3. Říjen, 2010 pekny, tky to mozna pouuziju Link to comment Share on other sites More sharing options...
Guest [BJ]boban88 Odesláno: 3. Říjen, 2010 Share Odesláno: 3. Říjen, 2010 pekny, tky to mozna pouuziju dik Link to comment Share on other sites More sharing options...
Guest Frodo Odesláno: 3. Říjen, 2010 Share Odesláno: 3. Říjen, 2010 kde mas definovany dvd jako params? Nemas tam stock PlayerName pro novacky. Link to comment Share on other sites More sharing options...
NurofeN-Cz 0 Odesláno: 3. Říjen, 2010 Share Odesláno: 3. Říjen, 2010 Hej, jak jsi psal o tom nefunksim tutu, me jde.. Link to comment Share on other sites More sharing options...
Guest [BJ]boban88 Odesláno: 3. Říjen, 2010 Share Odesláno: 3. Říjen, 2010 kde mas definovany dvd jako params?Nemas tam stock PlayerName pro novacky. skus sa pozriet new dvd; if(!params[0] || !(dvd = chrfind a ok pridam stock playername pridany stock PlayerName Link to comment Share on other sites More sharing options...
Guest Frodo Odesláno: 3. Říjen, 2010 Share Odesláno: 3. Říjen, 2010 kde mas definovany dvd jako params?Nemas tam stock PlayerName pro novacky. skus sa pozriet new dvd; if(!params[0] || !(dvd = chrfind a ok pridam stock playername pridany stock PlayerName aha ja jsem zvyklej to delat zvlast Link to comment Share on other sites More sharing options...
Guest [BJ]boban88 Odesláno: 3. Říjen, 2010 Share Odesláno: 3. Říjen, 2010 pohoda kazdy mame vlastny styl Link to comment Share on other sites More sharing options...
Guest Odesláno: 3. Říjen, 2010 Share Odesláno: 3. Říjen, 2010 prečo si nepoužil dini ? nemusíš stále fopen... fwrite... fclose... ale dal by si iba dini_Set("GM/Report.txt","Report:",string); Link to comment Share on other sites More sharing options...
Guest [BJ]boban88 Odesláno: 3. Říjen, 2010 Share Odesláno: 3. Říjen, 2010 tiez moznost Link to comment Share on other sites More sharing options...
Bloodyn 0 Odesláno: 22. Březen, 2011 Share Odesláno: 22. Březen, 2011 Sorry za old temu ale hlasi mi to : \0.3c\pawno\report.pwn(88) : error 017: undefined symbol "dcmd" Link to comment Share on other sites More sharing options...
Angelus 3 Odesláno: 22. Březen, 2011 Share Odesláno: 22. Březen, 2011 Hore do módu/fs: #define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1 nz... Link to comment Share on other sites More sharing options...
Bloodyn 0 Odesláno: 22. Březen, 2011 Share Odesláno: 22. Březen, 2011 Jo díky už to faka :thumbup: Link to comment Share on other sites More sharing options...
lhoj 0 Odesláno: 6. Duben, 2011 Share Odesláno: 6. Duben, 2011 sorry že píšu do starého topicu ale mám error : pawno\Mody\ZZM.pwn(617) : error 036: empty statement řádek : dcmd(report,6,cmdtext); thx za pomoc Link to comment Share on other sites More sharing options...
MinecraftPlayer 0 Odesláno: 6. Duben, 2011 Share Odesláno: 6. Duben, 2011 máš asik blbou definici #define dcmd(%1,%2,%3) if((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1 Link to comment Share on other sites More sharing options...
lhoj 0 Odesláno: 6. Duben, 2011 Share Odesláno: 6. Duben, 2011 máš asik blbou definici #define dcmd(%1,%2,%3) if((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1 aha díky už to fachčí sem tam neměl ten return 1 Link to comment Share on other sites More sharing options...
Nightshot 0 Odesláno: 22. Duben, 2011 Share Odesláno: 22. Duben, 2011 Pise mi to error: (306) : error 017: undefined symbol "dcmd" Radek: dcmd(report,6,cmdtext); Definice: #define dcmd(%1,%2,%3) if((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0)&&(dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1 Link to comment Share on other sites More sharing options...
MinecraftPlayer 0 Odesláno: 22. Duben, 2011 Share Odesláno: 22. Duben, 2011 musíš to dát nad #if defined filterscripts Link to comment Share on other sites More sharing options...
paveldaa 0 Odesláno: 15. Leden, 2012 Share Odesláno: 15. Leden, 2012 mam takovej dotaz,jak bych to měl upravit,aby to písalo jenom adminům který jsou online ? Link to comment Share on other sites More sharing options...
VoDnIk168 0 Odesláno: 15. Leden, 2012 Share Odesláno: 15. Leden, 2012 mam takovej dotaz,jak bych to měl upravit,aby to písalo jenom adminům který jsou online ? for(new i=0;i { if(IsPlayerConnected(i) && (/*podmínka na admin lvl*/[i] > 0))SendClientMessage(playerid,Barva, ""); } Link to comment Share on other sites More sharing options...
Vyholený*_*Sandokán 1 Odesláno: 25. Červenec, 2012 Share Odesláno: 25. Červenec, 2012 prepačte že otvaram stary topic ale hadže mi to errory.. C:\Users\pato\Desktop\všetko spolu\Pawno 0\gamemodes\22.pwn(1390) : error 012: invalid function call, not a valid address C:\Users\pato\Desktop\všetko spolu\Pawno 0\gamemodes\22.pwn(1390) : warning 215: expression has no effect C:\Users\pato\Desktop\všetko spolu\Pawno 0\gamemodes\22.pwn(1390) : error 001: expected token: ";", but found ")" C:\Users\pato\Desktop\všetko spolu\Pawno 0\gamemodes\22.pwn(1390) : error 029: invalid expression, assumed zero C:\Users\pato\Desktop\všetko spolu\Pawno 0\gamemodes\22.pwn(1390) : fatal error 107: too many error messages on one line riadok format(string, 128, "Hráč [ %s ] nahlásil hráča [ %s ] dôvod [%s]", PlayerName(playerid),PlayerName(hlaseny), params[dvd]);//sprava ktorá sa napise do chatu ale aj do nasho suboru report.txt a cely dcmd dcmd_report(playerid, params[]){ new dvd; new File:reportf=fopen("report.txt", io_append );//cele toto je vytvorenie zlozky v scriptfiles z nazvom report.txt if(!params[0] || !(dvd = chrfind(' ', params) + 1) || !params[dvd]) return SCM(playerid,0xFF0000AA, "/report [ ID ] [ DOVOD ]");//v prípade že zadal nesprávne príkaz if(strlen(params[dvd]) > 24) return SCM(playerid,0xFF0000AA,"Prilis dlhy dovod");//ak je dovod prilis dlhy new hlaseny = strval(params); if(!IsPlayerConnected(hlaseny)) return SCM(playerid,0xFF0000AA,"Toto ID nieje pripojene");//ak ID ktore napisal do prikazu nieje v tom case pripojene new string[128]; format(string, 128, "Hráč [ %s ] nahlásil hráča [ %s ] dôvod [%s]", PlayerName(playerid),PlayerName(hlaseny), params[dvd]);//sprava ktorá sa napise do chatu ale aj do nasho suboru report.txt SendClientMessageToAll(0xFF0000AA,string); print(string);//toto nieje potrebne ja to tam mam len tak ide oto ze vam to napise aj do serverlogu fwrite(reportf, string);//znamena ze nam to zapise do nasho suboru fclose(reportf);//po zapisani subor uzavrie return 1;//vratime hodnotu }//ukoncime prikaz Link to comment Share on other sites More sharing options...
_Martin_ 10 Odesláno: 25. Červenec, 2012 Share Odesláno: 25. Červenec, 2012 params[dvd]? Skôr params[2] nie? Link to comment Share on other sites More sharing options...
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