[POMOC] 3DTExtLabel

Započeo Vitez El arambasa, Januar 04, 2014, 18:31:41 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: B.E x14 (editujem iz zezanja)
Detaljan opis problema: Pa napravio sam da ispred svake organizacije stoji 3DTEXTLABEL sa natpisom npr : [MILICIJA]\n Lider : %s , sad ja sam to uradio ali ne znam kako da napravim Update3Dtextlabel sa komandom /makeleader tj da ubacim Update3dtextlabel u komandu /makeleader
Dio skripte:Dacu dole
Neke slike/video za lakse dobivanje pomoci(neobavezno): //

// MAKE LEADER komanda
//----------------------------------[MAKELEADER]------------------------------------------------
if(strcmp(cmd, "/makeleader", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "KORISCENJE: /makeleader [playerid/Deo imena] [Number(1-10)]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(level > 24 || level < 0) { SendClientMessage(playerid, COLOR_GREY, "   Ne idite ispod 0, ili iznad 24!"); return 1; }
if (PlayerInfo[playerid][pOSC] >= 1337)
{
    if(IsPlayerConnected(para1))
    {
        if(para1 != INVALID_PLAYER_ID)
        {
            if(PlayerInfo[para1][pMember] > 0 || PlayerInfo[para1][pFMember] < 255)
            {
                SendClientMessage(playerid, COLOR_GREY, "   Taj igrac je u organizaciji !");
                return 1;
            }
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pLeader] = level;
format(string, sizeof(string), "   Promovisani ste za lidera od strane OSCa %s", sendername);
SendClientMessage(para1, COLOR_WHITE, string);
format(string, sizeof(string), "   Dali ste igracu %s lidera ID %d.", giveplayer,level);
SendClientMessage(playerid, COLOR_WHITE, string);
//SetPlayerSpawn(para1);
if(level == 0) { PlayerInfo[para1][pChar] = 0; PlayerInfo[para1][pRank] = 0; gTeam[para1] = 3; PlayerInfo[para1][pTeam] = 0; return 1; }
else if(level == 1) { PlayerInfo[para1][pChar] = 288; } //Police Force
else if(level == 2) { PlayerInfo[para1][pChar] = 286; } //Interventna
else if(level == 3) { PlayerInfo[para1][pChar] = 287; } //National Guard
else if(level == 4) { PlayerInfo[para1][pChar] = 228; } //Fire/Ambulance
else if(level == 5) { PlayerInfo[para1][pChar] = 175; } //Surenos
else if(level == 6) { PlayerInfo[para1][pChar] = 113; } //La Famiglia Sinatra
else if(level == 7) { PlayerInfo[para1][pChar] = 147; } //Mayor
else if(level == 8) { PlayerInfo[para1][pChar] = 20; } //Hitmans
else if(level == 9) { PlayerInfo[para1][pChar] = 227; } //News Reporters
else if(level == 10) { PlayerInfo[para1][pChar] = 61; } //Taxi Cab Company
else if(level == 11) { PlayerInfo[para1][pChar] = 186; } //yak
else if(level == 12) { PlayerInfo[para1][pChar] = 110; } //ms
else if(level == 13) { PlayerInfo[para1][pChar] = 296; } //ballas
else if(level == 14) { PlayerInfo[para1][pChar] = 123; } //Yamaguchi
else if(level == 15) { PlayerInfo[para1][pChar] = 271; } //GSF
else if(level == 16) { PlayerInfo[para1][pChar] = 217; } //PS
else if(level == 18) { PlayerInfo[para1][pChar] = 127; } //LCN
else if(level == 19) { PlayerInfo[para1][pChar] = 294; } //LCN
else if(level == 20) { PlayerInfo[para1][pChar] = 98; } //LCN
else if(level == 21) { PlayerInfo[para1][pChar] = 98; } //LCN
else if(level == 22) { PlayerInfo[para1][pChar] = 98; } //LCN
else if(level == 23) { PlayerInfo[para1][pChar] = 98; } //LCN
else if(level == 24) { PlayerInfo[para1][pChar] = 98; } //LCN
                        format(LiderInfo[level-1][lLider],48,"%s",giveplayer);
                        strmid(LiderInfo[level-1][lLider], giveplayer, 0, strlen(giveplayer), 255);
if(level == 0)
{
    gTeam[para1] = 3;
    PlayerInfo[para1][pTeam] = 3;
}
else if(level == 1 || level == 2 || level == 3)
{
    gTeam[para1] = 2;
    PlayerInfo[para1][pTeam] = 2;
}
else if(level == 4)
{
    gTeam[para1] = 1;
    PlayerInfo[para1][pTeam] = 1;
}
else
{
    gTeam[para1] = 15;
    PlayerInfo[para1][pTeam] = 15;
}

    SetPlayerSkin(para1, PlayerInfo[para1][pChar]);

    if(level == 0)
    {
        PlayerInfo[para1][pRank] = 0;
    }
    else
    {
    PlayerInfo[para1][pRank] = 6;
}
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   Nisi ovlascen da koristis ovu komandu!");
}
}
return 1;
}



3DTextlabeli
//LIDERI 3D
new liderstring[200];

format(liderstring, sizeof(liderstring), "[MILICIJA]\nLider: %d\n", LiderInfo[1][lLider]);
milicijalider = Create3DTextLabel(liderstring,0xF300FFFF, 1552.4725,-1681.4130,14.8968, 100,0,1);

format(liderstring, sizeof(liderstring), "[INTERVENTNA]\nLider: %d\n", LiderInfo[2][lLider]);
interventnalider = Create3DTextLabel(liderstring,0xF300FFFF, 1525.7046,-1450.5051,13.5469, 100,0,1);

format(liderstring, sizeof(liderstring), "[BOLNICARI]\nLideri: %d\n", LiderInfo[4][lLider]);
bolnicalider = Create3DTextLabel(liderstring,0xF300FFFF, 1172.0852,-1327.6771,15.4103, 100,0,1);

format(liderstring, sizeof(liderstring), "[PARKING SERVIS]\nLider: %d\n", LiderInfo[16][lLider]);
pslider = Create3DTextLabel(liderstring,0xF300FFFF, 1021.9592,-934.7427,42.1797, 100,0,1);

format(liderstring, sizeof(liderstring), "[NOVINARI]\nLider: %d\n", LiderInfo[9][lLider]);
novinarilider = Create3DTextLabel(liderstring,0xF300FFFF, 1797.6423,-1295.2466,13.3883, 100,0,1);

format(liderstring, sizeof(liderstring), "[MS13]\nLider: %d\n", LiderInfo[12][lLider]);
ms13lider = Create3DTextLabel(liderstring,0xF300FFFF, 2607.1006,-1057.4556,69.5730, 100,0,1);

format(liderstring, sizeof(liderstring), "[LOS SURENOS]\nLider: %d\n", LiderInfo[5][lLider]);
surenoslider = Create3DTextLabel(liderstring,0xF300FFFF, 1832.8982,-1994.1632,13.5469, 100,0,1);

format(liderstring, sizeof(liderstring), "[BALLAS]\nLider: %d\n", LiderInfo[13][lLider]);
ballaslider = Create3DTextLabel(liderstring,0xF300FFFF, 2520.7495,-1523.5205,27.2705, 100,0,1);

format(liderstring, sizeof(liderstring), "[GROOVE STREET FAMILY]\nLider: %d\n", LiderInfo[15][lLider]);
groovelider = Create3DTextLabel(liderstring,0xF300FFFF, 2492.8801,-1687.5956,13.5141, 100,0,1);
//LIDERI 3D

Aj probaj ovako ako ne bude radilo javi.


if(level == 1) { PlayerInfo[para1][pChar] = 288; LiderInfo[1][lLider] = ImePrezime(para1);} //Police Force
else if(level == 2) { PlayerInfo[para1][pChar] = 286; LiderInfo[2][lLider] = ImePrezime(para1);} //Interventna
else if(level == 3) { PlayerInfo[para1][pChar] = 287; LiderInfo[3][lLider] = ImePrezime(para1);} //National Guard
else if(level == 4) { PlayerInfo[para1][pChar] = 228; LiderInfo[4][lLider] = ImePrezime(para1);} //Fire/Ambulance
else if(level == 5) { PlayerInfo[para1][pChar] = 175; LiderInfo[5][lLider] = ImePrezime(para1);} //Surenos
else if(level == 6) { PlayerInfo[para1][pChar] = 113; LiderInfo[6][lLider] = ImePrezime(para1);} //La Famiglia Sinatra


I ovo probaj.


new string[50];
format(string,sizeof(string),"[MILICIJA]\nLider: %d\n", LiderInfo[1][lLider] = ImePrezime(para1));
UpdateDynamic3DTextLabelText(milicijalabel, 0x9EC73DAA, string);

format(string,sizeof(string),"[INTERVENTNA]\nLider: %d\n", LiderInfo[2][lLider] = ImePrezime(para1));
UpdateDynamic3DTextLabelText(interventnalabel, 0x9EC73DAA, string);

format(string,sizeof(string),"[BOLNICA]\nLider: %d\n", LiderInfo[3][lLider] = ImePrezime(para1));
UpdateDynamic3DTextLabelText(bolnicalabel, 0x9EC73DAA, string);


Pa ti dalje nastavi ako bude radilo.
Poslednja Izmena: Januar 04, 2014, 19:09:16 POSLE PODNE od caupton'S


Ubaci samo ovaj stock.

stock ImePrezime(playerid)
{
new ime[MAX_PLAYER_NAME];
GetPlayerName(playerid, ime, sizeof(ime));
return ime;
}