[Pomoc] atach 3dtextklabel na igraca.

Započeo Otisao s Foruma!, Februar 09, 2012, 23:40:06 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.


Skripta koju koristim:FG
Detaljan opis problema: imam pitanje dali je ovaj text kada neko napravi acc da ce mu pisat ovo i kako da napravim kada predje u 2 lvl da to nestane samo tj ovaj text.
Dio skripte:public OnPlayerConnect(playerid)
{
if(PlayerInfo[playerid][pLevel] == 1)
{
label[playerid] = Create3DTextLabel("picimangos", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):
[[/center]
DgL <3
Otisao s Foruma zz


Pa staviš u komandi buylevel kada kupi level if(PlayerInfo[playerid][pLevel] == 2) return Delete3DTextLabel(label[playerid]);
"I'm a loser and a user so I don't need no accuser" - Billie Joe Armstrong

Citat: ¢fg:) poslato Februar 09, 2012, 23:40:06 POSLE PODNE

Skripta koju koristim:FG
Detaljan opis problema: imam pitanje dali je ovaj text kada neko napravi acc da ce mu pisat ovo i kako da napravim kada predje u 2 lvl da to nestane samo tj ovaj text.
Dio skripte:public OnPlayerConnect(playerid)
{
if(PlayerInfo[playerid][pLevel] == 1)
{
label[playerid] = Create3DTextLabel("picimangos", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):
To ce ti pisati samo za igraca Lvl 1

gdje brate trebam da dodam ovdje to destroY

if (strcmp(cmd, "/levelup", true) == 0 || strcmp(cmd, "/kupilevel", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if (gPlayerLogged[playerid] != 0)
{
/*PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);*/
if(PlayerInfo[playerid][pLevel] >= 0)
{
new nxtlevel = PlayerInfo[playerid][pLevel]+1;
/*new costlevel = nxtlevel*levelcost;//10k for testing purposes*/
new expamount = nxtlevel*levelexp;
new infostring[128];
/*if(GetPlayerMoney(playerid) < costlevel)
{
format(infostring, 256, "   You do not have enough Cash ($%d)!",costlevel);
SendClientMessage(playerid, COLOR_GRAD1, infostring);
return 1;
}*/
if (PlayerInfo[playerid][pExp] < expamount)
{
format(infostring, 256, "   Treba vam %d Respekt Poena,trenutno imate [%d] !",expamount,PlayerInfo[playerid][pExp]);
SendClientMessage(playerid, COLOR_GRAD1, infostring);
return 1;
}
else
{
format(string, sizeof(string), "~g~VECI NIVO~n~~w~Sada ste level %d", nxtlevel);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
/*SafeGivePlayerMoney(playerid, (-costlevel));*/
PlayerInfo[playerid][pLevel]++;
if(PlayerInfo[playerid][pDonateRank] > 0)
{
    PlayerInfo[playerid][pExp] -= expamount;
    new total = PlayerInfo[playerid][pExp];
    if(total > 0)
    {
        PlayerInfo[playerid][pExp] = total;
    }
    else
    {
        PlayerInfo[playerid][pExp] = 0;
    }
}
else
{
PlayerInfo[playerid][pExp] = 0;
}
PlayerInfo[playerid][gPupgrade] = PlayerInfo[playerid][gPupgrade]+2;
GameTextForPlayer(playerid, string, 5000, 1);
format(infostring, 256, "   Kupili ste level %d Kucajte /nadogradnjda", nxtlevel);
SendClientMessage(playerid, COLOR_GRAD1, infostring);
format(infostring, 256, "   Imate %d nepotrosenih Upgrade Poena",PlayerInfo[playerid][gPupgrade]);
SendClientMessage(playerid, COLOR_GRAD2, infostring);
}
}
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   Niste prijavljeni !");
}
}
return 1;
}
[[/center]
DgL <3
Otisao s Foruma zz


dodaÅ¡ ispod ovog npr. PlayerInfo[playerid][pLevel]++;                                       
"I'm a loser and a user so I don't need no accuser" - Billie Joe Armstrong

nema erora ni warning testiracu valjda ce biti ok i definirao sam label.hvala ti  ;)

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