Brcko. 1 Odesláno: 23. Srpen, 2017 Share Odesláno: 23. Srpen, 2017 Zdravím, hledám jeden script na to že když se napíše #(ID) (TEXT) buď je to # nebo @ Teď nevím. Nemáte to někdo prosím ? Hrozně bych to potřeboval 1 Link to comment Share on other sites More sharing options...
Woody 114 Odesláno: 23. Srpen, 2017 Share Odesláno: 23. Srpen, 2017 Wut? Vůbec nechápu, co myslíš. Popis to více. Link to comment Share on other sites More sharing options...
OceT 60 Odesláno: 23. Srpen, 2017 Share Odesláno: 23. Srpen, 2017 (upraveno) Wut? Vůbec nechápu, co myslíš. Popis to více. Asi myslí označení hráče v chatu - @ID http://forum.sa-mp.com/showthread.php?t=541509 http://forum.sa-mp.com/showthread.php?t=518521 //Edit: Jinak máš to asi ve špatné sekci.. Edited 23. Srpen, 2017 by OceT Link to comment Share on other sites More sharing options...
Brcko. 1 Odesláno: 23. Srpen, 2017 Author Share Odesláno: 23. Srpen, 2017 (upraveno) Asi myslí označení hráče v chatu - @ID http://forum.sa-mp.com/showthread.php?t=541509 http://forum.sa-mp.com/showthread.php?t=518521 //Edit: Jinak máš to asi ve špatné sekci.. Ano, Přesně označení hráče v chatu. JInak dal jsem to do pawna hodilo to pár errorů.. C:\Documents and Settings\Pepa\Plocha\playertext.pwn(1) : warning 235: public function lacks forward declaration (symbol "OnPlayerText") C:\Documents and Settings\Pepa\Plocha\playertext.pwn(4) : error 017: undefined symbol "format" C:\Documents and Settings\Pepa\Plocha\playertext.pwn(4) : warning 202: number of arguments does not match definition C:\Documents and Settings\Pepa\Plocha\playertext.pwn(4) : warning 202: number of arguments does not match definition C:\Documents and Settings\Pepa\Plocha\playertext.pwn(4) : warning 202: number of arguments does not match definition C:\Documents and Settings\Pepa\Plocha\playertext.pwn(8) : error 017: undefined symbol "strval" C:\Documents and Settings\Pepa\Plocha\playertext.pwn(10) : error 017: undefined symbol "IsPlayerConnected" C:\Documents and Settings\Pepa\Plocha\playertext.pwn(11) : error 017: undefined symbol "MAX_PLAYER_NAME" C:\Documents and Settings\Pepa\Plocha\playertext.pwn(11) : error 009: invalid array size (negative, zero or out of bounds) C:\Documents and Settings\Pepa\Plocha\playertext.pwn(11) : error 036: empty statement C:\Documents and Settings\Pepa\Plocha\playertext.pwn(11) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 7 Errors. Nevíte jak to opravit? Jestli to mám ve špatné sekci tak se omlouvám, když tak to přehoďte :-) Přesněji, potřeboval bych to na svůj Paradise World, blbne mi stím 4. úkol v /ukoly.. :/ Edited 23. Srpen, 2017 by Brcko. Link to comment Share on other sites More sharing options...
OceT 60 Odesláno: 23. Srpen, 2017 Share Odesláno: 23. Srpen, 2017 (upraveno) Ano, Přesně označení hráče v chatu. JInak dal jsem to do pawna hodilo to pár errorů.. C:\Documents and Settings\Pepa\Plocha\playertext.pwn(1) : warning 235: public function lacks forward declaration (symbol "OnPlayerText") C:\Documents and Settings\Pepa\Plocha\playertext.pwn(4) : error 017: undefined symbol "format" C:\Documents and Settings\Pepa\Plocha\playertext.pwn(4) : warning 202: number of arguments does not match definition C:\Documents and Settings\Pepa\Plocha\playertext.pwn(4) : warning 202: number of arguments does not match definition C:\Documents and Settings\Pepa\Plocha\playertext.pwn(4) : warning 202: number of arguments does not match definition C:\Documents and Settings\Pepa\Plocha\playertext.pwn(8) : error 017: undefined symbol "strval" C:\Documents and Settings\Pepa\Plocha\playertext.pwn(10) : error 017: undefined symbol "IsPlayerConnected" C:\Documents and Settings\Pepa\Plocha\playertext.pwn(11) : error 017: undefined symbol "MAX_PLAYER_NAME" C:\Documents and Settings\Pepa\Plocha\playertext.pwn(11) : error 009: invalid array size (negative, zero or out of bounds) C:\Documents and Settings\Pepa\Plocha\playertext.pwn(11) : error 036: empty statement C:\Documents and Settings\Pepa\Plocha\playertext.pwn(11) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 7 Errors. Nevíte jak to opravit? Jestli to mám ve špatné sekci tak se omlouvám, když tak to přehoďte :-) Přesněji, potřeboval bych to na svůj Paradise World, blbne mi stím 4. úkol v /ukoly.. :/ Asi nemáš nahoře #include <a_samp> Edited 23. Srpen, 2017 by OceT Link to comment Share on other sites More sharing options...
Brcko. 1 Odesláno: 23. Srpen, 2017 Author Share Odesláno: 23. Srpen, 2017 Hodil jsem o tam + upravil jeden řádek který byl napsán na forumu a teď to hází tohle: C:\Documents and Settings\Pepa\Plocha\playertext.pwn(9) : error 003: declaration of a local variable must appear in a compound block C:\Documents and Settings\Pepa\Plocha\playertext.pwn(9) : warning 217: loose indentation C:\Documents and Settings\Pepa\Plocha\playertext.pwn(9) : error 017: undefined symbol "id" C:\Documents and Settings\Pepa\Plocha\playertext.pwn(10) : error 017: undefined symbol "id" C:\Documents and Settings\Pepa\Plocha\playertext.pwn(11) : error 017: undefined symbol "id" C:\Documents and Settings\Pepa\Plocha\playertext.pwn(13) : warning 217: loose indentation C:\Documents and Settings\Pepa\Plocha\playertext.pwn(13) : error 017: undefined symbol "id" C:\Documents and Settings\Pepa\Plocha\playertext.pwn(29) : warning 209: function "OnPlayerText" should return a value C:\Documents and Settings\Pepa\Plocha\playertext.pwn(30) : error 021: symbol already defined: "SendPlayerMessageToAll" C:\Documents and Settings\Pepa\Plocha\playertext.pwn(31) : error 010: invalid function or declaration Link to comment Share on other sites More sharing options...
OceT 60 Odesláno: 23. Srpen, 2017 Share Odesláno: 23. Srpen, 2017 A co si tam upravoval? Pošli kód jak to tam máš.. Link to comment Share on other sites More sharing options...
Brcko. 1 Odesláno: 23. Srpen, 2017 Author Share Odesláno: 23. Srpen, 2017 Na forum bylo napsané že se musí upravit tohle if ((string[i + 1] > 47) && (string[i + 1] < 58)) { Na tohle if('0' <= string[i + 1] <= '9') Teď to tam teda vypadá takhle #include <a_samp> public OnPlayerText(playerid, text[]) { new string[128]; format(string, sizeof(string), "%s", text); for (new i; i < 128; i++) { if (string[i] == '@') { if('0' <= string[i + 1] <= '9') new id = strval(string[i + 1]); if (id <= 500) { if (IsPlayerConnected(id)) { new menohraca[MAX_PLAYER_NAME]; GetPlayerName(id, menohraca, MAX_PLAYER_NAME); new j = (i + 1); while ((j < (i + 5)) && ((string[j] > 47) && (string[j] < 58))) j++; strdel(string, i, j); strins(string, menohraca, i, 128); } else { SendClientMessage(playerid, 0xFF0000FF, "Zlé ID"); return 0; } } else { SendClientMessage(playerid, 0xFF0000FF, "Zlé ID"); return 0; } } } } SendPlayerMessageToAll(playerid, string); return 0; } Link to comment Share on other sites More sharing options...
OceT 60 Odesláno: 23. Srpen, 2017 Share Odesláno: 23. Srpen, 2017 Na forum bylo napsané že se musí upravit tohle if ((string[i + 1] > 47) && (string[i + 1] < 58)) { Na tohle if('0' <= string[i + 1] <= '9') Smazal si tam závorku { if('0' <= string[i + 1] <= '9') nahraď na if('0' <= string[i + 1] <= '9') { Link to comment Share on other sites More sharing options...
Lukasz 336 Odesláno: 23. Srpen, 2017 Share Odesláno: 23. Srpen, 2017 Na forum bylo napsané že se musí upravit tohle if ((string[i + 1] > 47) && (string[i + 1] < 58)) { Na tohle if('0' <= string[i + 1] <= '9') Lžeš, nic takového se tam nepíše. Link to comment Share on other sites More sharing options...
Brcko. 1 Odesláno: 23. Srpen, 2017 Author Share Odesláno: 23. Srpen, 2017 Teď to píše jeden error C:\Documents and Settings\Pepa\Plocha\playertext.pwn(13) : warning 217: loose indentation Lžeš, nic takového se tam nepíše. http://forum.sa-mp.com/showthread.php?t=518521 Poslední přdaný příspěvek, úplně dole. Link to comment Share on other sites More sharing options...
Rawy 18 Odesláno: 23. Srpen, 2017 Share Odesláno: 23. Srpen, 2017 Teď to píše jeden error To není error ale obyčejný warning. Buď si to odtabuj nebo dej nahoru #pragma tabsize 0 Ale na serveru ti to půjde i bez toho. Link to comment Share on other sites More sharing options...
Lukasz 336 Odesláno: 23. Srpen, 2017 Share Odesláno: 23. Srpen, 2017 (upraveno) It could be written like this as well, which is a bit clearer: if('0' <= string[i + 1] <= '9') It simply checks if the character is a number. Kde v té větě máš, že se tam něco MUSÍ upravovat? Je to jen jiný zápis toho stejného. K warningu, správně si to odtabuj, tabsize 0 nepoužívej. Edited 23. Srpen, 2017 by Lukasz Link to comment Share on other sites More sharing options...
Brcko. 1 Odesláno: 23. Srpen, 2017 Author Share Odesláno: 23. Srpen, 2017 Počkat, teď nechápu. Tak jaké číslo tam musím dát? Když jsem tam dal tabsize 0 úspěšně se to dalo do .amx ale na serveru když jsem napsal @1 Ahoj :-) Tak to nefungovalo.. Link to comment Share on other sites More sharing options...
Rawy 18 Odesláno: 23. Srpen, 2017 Share Odesláno: 23. Srpen, 2017 (upraveno) Počkat, teď nechápu. Tak jaké číslo tam musím dát? Když jsem tam dal tabsize 0 úspěšně se to dalo do .amx ale na serveru když jsem napsal @1 Ahoj :-) Tak to nefungovalo.. Buď si to odtabuj nebo si tam dej jakékoliv číslo, funkčnost scriptu to neovlivní Edited 23. Srpen, 2017 by RaWyN Link to comment Share on other sites More sharing options...
Invouk 91 Odesláno: 23. Srpen, 2017 Share Odesláno: 23. Srpen, 2017 https://pastebin.com/mEyvAf3B Link to comment Share on other sites More sharing options...
Brcko. 1 Odesláno: 23. Srpen, 2017 Author Share Odesláno: 23. Srpen, 2017 Buď si to odtabuj nebo si tam dej jakékoliv číslo, funkčnost scriptu to neovlivní Dobře, díky moc. https://pastebin.com/mEyvAf3B nefunguje mi to Asi se vyseru na nějaký paradise -.- Link to comment Share on other sites More sharing options...
DuFF 79 Odesláno: 24. Srpen, 2017 Share Odesláno: 24. Srpen, 2017 Možno skús toto: https://pastebin.com/Hbs1zCGR, testoval som to iba s ID 0, nezaručujem funkčnosť. Je tam ešte problém s tým, že SCMTA spracuje iba reťazec dlhý max 144, čo je dosť málo. Link to comment Share on other sites More sharing options...
Brcko. 1 Odesláno: 24. Srpen, 2017 Author Share Odesláno: 24. Srpen, 2017 Už mi to funguje, zjistil jsem že tam nemá být # ani @ ale má tám být %, můžete lock. Jinak díky za pomoct, určitě to využiju na jiným modě:-)) Link to comment Share on other sites More sharing options...
Recommended Posts