Stellet 7 Odesláno: 29. Duben, 2015 Share Odesláno: 29. Duben, 2015 Ahoj mám dotaz, proč mi to píše 2x ? Code: public OnPlayerText(playerid, text[]) { new Name[64]; GetPlayerName(playerid,Name,64); new str[500]; format(str,sizeof(str),"%s (%d): %s",Name,playerid,text); SendClientMessageToAll(COLOR_WHITE,str); return 1; } Ale ve hře to ukáže 2x, ten základní a ten můj: Link to comment Share on other sites More sharing options...
0 Om3n 78 Odesláno: 29. Duben, 2015 Share Odesláno: 29. Duben, 2015 return 0 si dej Link to comment Share on other sites More sharing options...
0 Stellet 7 Odesláno: 29. Duben, 2015 Author Share Odesláno: 29. Duben, 2015 ště šlo by něják to jméno barevně ? Potřebuju když je taxikář(žlutá) př: ScOtCZ(1): Yeah Akorát trošku tmavší Link to comment Share on other sites More sharing options...
0 Om3n 78 Odesláno: 29. Duben, 2015 Share Odesláno: 29. Duben, 2015 možnost číslo 1 format(str,sizeof(str),"{RRGGBB}%s {FFFFFF}(%d): %s",Name,playerid,text); //misto RRGGBB si dej hexadecimalni hodnotu barvy kterou chces možnost číslo 2 format(str,sizeof(str),"%s {FFFFFF}(%d): %s",Name,playerid,text); SendClientMessageToAll(COLOR_YELLOW,str);// si nadefinuj COLOR_YELLOW jestli nemas Link to comment Share on other sites More sharing options...
0 Quiter 99 Odesláno: 29. Duben, 2015 Share Odesláno: 29. Duben, 2015 format(str,sizeof(str),"{%06X}%s {FFFFFF}(%d): %s",GetPlayerColor(playerid),Name,playerid,text); //toto by malo fungovať alebo SendClientMessageToAll(GetPlayerColor(playerid),str); Link to comment Share on other sites More sharing options...
0 Om3n 78 Odesláno: 29. Duben, 2015 Share Odesláno: 29. Duben, 2015 format(str,sizeof(str),"{%06X}%s {FFFFFF}(%d): %s",GetPlayerColor(playerid),Name,playerid,text); //toto by malo fungovať alebo SendClientMessageToAll(GetPlayerColor(playerid),str); netestoval sem to ale nemelo by to bejt format(str,sizeof(str),"{%06X}%s {FFFFFF}(%d): %s",GetPlayerColor(playerid) >>> 8,Name,playerid,text); jelikoz GetPlayerColor ti to vrati ve formatu 0xRRGGBBAA.. ale v tomhle pripade potrebujes hodnotu bez 0x a bez alpha hodnoty. takze musis pouzit bitovej posun. Link to comment Share on other sites More sharing options...
0 Quiter 99 Odesláno: 29. Duben, 2015 Share Odesláno: 29. Duben, 2015 netestoval sem to ale nemelo by to bejt format(str,sizeof(str),"{%06X}%s {FFFFFF}(%d): %s",GetPlayerColor(playerid) >>> 8,Name,playerid,text); jelikoz GetPlayerColor ti to vrati ve formatu 0xRRGGBBAA.. ale v tomhle pripade potrebujes hodnotu bez 0x a bez alpha hodnoty. takze musis pouzit bitovej posun. Je to možné, ja som si to len našiel na pawno wiki, nikdy som to nepoužíval a nerozumiem sa tomu Dík že si ma opravil Link to comment Share on other sites More sharing options...
Dotaz
Stellet 7
Ahoj mám dotaz, proč mi to píše 2x ? Code:
Ale ve hře to ukáže 2x, ten základní a ten můj:
Link to comment
Share on other sites
6 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