[Pomoc] boja imena u chatu!

Započeo Otisao s Foruma!, Februar 11, 2012, 01:22:35 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.


Skripta koju koristim:FG
Detaljan opis problema:kako da promjenim boju imena u chatu od igraca :D
Dio skripte:SetPlayerColor(playerid, 0xFFFF00AA); ovo sam bio probao stavio u OnPlayerConnect ali se nije nista promjenilo boja bjela isto.
Neke slike/video za lakse dobivanje pomoci(neobavezno: http://www.zaslike.com/viewer.php?file=bgvpi9v9au60ue82ot.jpg
[[/center]
DgL <3
Otisao s Foruma zz


format(string, sizeof(string), "%s kaze: %s", sendername, result);

u skripti imas ovako nesta?Ako imas onda samo ispred "%s" neku boju, npr... {FF6347} - crvena
to bi izgledalo ovako...

format(string, sizeof(string), "{FF6347}%s kaze: %s", sendername, result);

ako tako stavis onda ce ti sve bit CRVENO u ovom slucaju, ako zelis da ti samo ime bude CRVENO, a sve ostalo bijelo onda stavis na ovaj nacin

format(string, sizeof(string), "{FF6347}%s{FFFFFF} kaze: %s", sendername, result);

{FFFFFF}-bijela

kuzis?

a brate gdje trebam ovo da ubacim u modu_?

format(string, sizeof(string), "{FF6347}%s{FFFFFF} kaze: %s", sendername, result);
[[/center]
DgL <3
Otisao s Foruma zz


format(string, sizeof(string), "%s kaze: %s", sendername, result);

ovo probaj nac u skripti
Poslednja Izmena: Februar 11, 2012, 02:07:14 PRE PODNE od Paul McCartney

brt promjenio sam onaj chat /local al nez gdje treba kada T pritisnes tu nez kako boju promjenit
Poslednja Izmena: Februar 11, 2012, 02:33:05 PRE PODNE od ¢fg:)
[[/center]
DgL <3
Otisao s Foruma zz



vlado_plavsic


eo to je ta komanda tu sam promjenio boju i ovo je ok ali kada T pritisnem i pisem onda je bjela.

if(strcmp(cmd, "/local", true) == 0 || strcmp(cmd, "/say", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged[playerid] == 0)
        {
            SendClientMessage(playerid, COLOR_GREY, "   Niste se prijavili!");
            return 1;
        }
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /local [local chat]");
return 1;
}
if(!IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "Stranac kaze: %s", result);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
else
    {
    format(string, sizeof(string), "{00C8FF}%s{FFFFFF} kaze: %s", sendername, result);
    ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
}
else
{
    new carid = GetPlayerVehicleID(playerid);
    if(IsABike(carid) || IsAOBike(carid) || IsAPizzabike(carid) || IsAPlane(carid) || IsABoat(carid) || IsADjubretar(carid) || IsASweeper(carid) || IsAHarvest(carid) || IsADrugHarvest(carid) || IsATank(carid) || pveh == 523 || pveh == 480 || pveh == 567 || pveh == 533 || pveh == 555 || pveh == 539 || pveh == 572 || pveh == 571 || pveh == 530 || pveh == 457 || pveh == 575 || pveh == 536 || pveh == 424)
    {
        if(PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "Stranac kaze: %s", result);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
else
{
    format(string, sizeof(string), "{00C8FF}%s{FFFFFF} kaze: %s", sendername, result);
    ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
    }
    else
    {
    if(VehicleWindows[GetPlayerVehicleID(playerid)] == 0)
    {
    if(PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "(Zatvoren prozor) Stranac kaze: %s", result);
ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
else
{
    format(string, sizeof(string), "(Zatvoren prozor) %s kaze: %s", sendername, result);
    ProxDetector(10.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
}
else
{
    if(PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "(Otvoren prozor) Stranac kaze: %s", result);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
else
{
    format(string, sizeof(string), "(Otvoren prozor) %s kaze: %s", sendername, result);
    ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
}
}
}
printf("%s", string);
}
return 1;
}
[[/center]
DgL <3
Otisao s Foruma zz


vlado_plavsic

OnPlayerText pogledaj i nadji ono sto je gore postao decko...Ukoliko ne mozes da se snadjes postaj ceo taj callback pa ce mo da ti namestimo kako zelis(Naravno napisi kako zelis da ti bude.
)


vlado_plavsic

Citat: Paul McCartney poslato Februar 11, 2012, 02:54:38 PRE PODNE
pa dobro si napravio  :D ako imas definiranu tu boju, compilaj i testaj

Ne razumes sta on zelis.On je namestio local chat,sad mu treba pomoc oko obicnog "T" chata.Zbunjujes ga a i mene xD

if (realchat)
{
    if(gPlayerLogged[playerid] == 0)
    {
        return 0;
      }
GetPlayerName(playerid, sendername, sizeof(sendername));
if(!IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "Maskirana osoba kaze: %s", text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
//OnePlayAnim(playerid, "PED","IDLE_CHAT", 4.0,0,0,0,0,0);
}
else
{
    format(string, sizeof(string), "%s kaze: %s", sendername, text);
    ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
    //OnePlayAnim(playerid, "PED","IDLE_CHAT", 4.0,0,0,0,0,0);
}
}
else


umjesto toga stavi ovo

if (realchat)
{
    if(gPlayerLogged[playerid] == 0)
    {
        return 0;
      }
GetPlayerName(playerid, sendername, sizeof(sendername));
if(!IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "Maskirana osoba kaze: %s", text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
//OnePlayAnim(playerid, "PED","IDLE_CHAT", 4.0,0,0,0,0,0);
}
else
{
    format(string, sizeof(string), "{F81414}%s kaze: %s", sendername, text);
    ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
    //OnePlayAnim(playerid, "PED","IDLE_CHAT", 4.0,0,0,0,0,0);
}
}
else



trebalo bi radit

koiliko sam trazio taj real prije minutu nego sto si post nasao sam ga :D samo da testiram valjda ce biti ok..
[[/center]
DgL <3
Otisao s Foruma zz


krivo sam ti dao xD sad ce ti sve bit plavo  :P

ovako stavi
if (realchat)
{
    if(gPlayerLogged[playerid] == 0)
    {
        return 0;
      }
GetPlayerName(playerid, sendername, sizeof(sendername));
if(!IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][pMaskuse] == 1)
{
format(string, sizeof(string), "Maskirana osoba kaze: %s", text);
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
//OnePlayAnim(playerid, "PED","IDLE_CHAT", 4.0,0,0,0,0,0);
}
else
{
    format(string, sizeof(string), "{F81414}%s {FFFFFF}kaze: %s", sendername, text);
    ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
    //OnePlayAnim(playerid, "PED","IDLE_CHAT", 4.0,0,0,0,0,0);
}
}
else

hvalaaaaaaaaaaaaaaaaa vam mnogo radi perfektnoooooo  :D :D a za boje imam onaj SA-MP Colorpicker   ;)

moze lock!  ;D
[[/center]
DgL <3
Otisao s Foruma zz