Szerző Téma: Id a név melett gond  (Megtekintve 651 alkalommal)

Nem elérhető Stramm

  • 193
    • Profil megtekintése
Id a név melett gond
« Dátum: 2013. május 29. - 15:20:17 »
0 Show voters
Üdv van nekem ez a 
 
 new string[85],pname[24];
GetPlayerName(playerid,pname,24);
format(string,sizeof(string),\"%s[iD:%d]\",pname,playerid);
SendClientMessageToAll(playerid, string);

 
Kód azt hogy tudom megcsinálni hogy a nevet ne színezze hanem csak az ID-z   

Id a név melett gond
« Válasz #1 Dátum: 2013. május 29. - 15:33:18 »
0 Show voters
[iD:%d] úgy hogy csak ezt a részt színezed ki  %s ezt nem.

Nem elérhető jana4

  • 5929
  • Ex Staff
    • Profil megtekintése
Id a név melett gond
« Válasz #2 Dátum: 2013. május 29. - 20:19:55 »
0 Show voters

new string[64], pname[24];
GetPlayerName(playerid, pname, 24);
format(string, 64, \"%s {RRGGBB}[iD: %i]\", pname, playerid);
SendClientMessageToAll(-1, string);

 
RRGGBB --- színkód! ( Példa: FFFF00 - sárga, 00FF00 - zöld, FF0000 - piros )

Ezt hol szeretnéd alkalmazni?

Nem elérhető Stramm

  • 193
    • Profil megtekintése
Id a név melett gond
« Válasz #3 Dátum: 2013. május 29. - 20:20:47 »
0 Show voters
Idézetet írta: ScreaM date=1369851595\" data-ipsquote-contentapp=\"forums\" data-ipsquote-contenttype=\"forums\" data-ipsquote-contentid=\"37947\" data-ipsquote-contentclass=\"forums_Topic


new string[64], pname[24];
GetPlayerName(playerid, pname, 24);
format(string, 64, \"%s [iD: %i]\", pname, playerid);
SendClientMessageToAll(-1, string);

 
Ezt hol szeretnéd alkalmazni?
 
Chatban

Nem elérhető jana4

  • 5929
  • Ex Staff
    • Profil megtekintése
Id a név melett gond
« Válasz #4 Dátum: 2013. május 29. - 20:23:17 »
0 Show voters
Frissítettem az elõzõ hozzászólásomat, nézd át.

Akkor megírom azt a részét is:

 

public OnPlayerText(playerid, text[])
{
     new string[164], pname[24];
     GetPlayerName(playerid, pname, 24);
     format(string, 164, \"%s {RRGGBB}[iD: %i]{FFFFFF}: %s\", pname, playerid, text);
     SendClientMessageToAll(-1, string);
     return 0;
}

Id a név melett gond
« Válasz #5 Dátum: 2013. május 29. - 21:10:33 »
0 Show voters

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal