24.01.2011, 13:59
hi, i want to make that below players skin head, show his level.. but i dont know how..
my level code:
my level code:
pawn Код:
pInfo[playerid][Level]
pInfo[playerid][Level]
new PlayerText3D:playertextid[MAX_PLAYERS];
Onplayerspawn:
new Float:X, Float:Y, Float:Z;
GetPlayerPos( playerid, X, Y, Z );
playertextid[playerid] = CreatePlayer3DTextLabel(playerid,"Level:",0x008080FF,X,Y,Z,40.0);
format(string, sizeof(string), "Lygis: %d", pInfo[playerid][Lygis]);
Attach3DTextLabelToPlayer(playertextid[playerid],playerid,X,Y,Z); // tag mismatch
Playerdisconnect
Delete3DTextLabel(playertextid[playerid]); // tag mismatch
Playerupdate:
UpdatePlayer3DTextLabelText(playerid, playertextid[playerid], 0x008080FF, "Level: %d");
new Float:X, Float:Y, Float:Z;
GetPlayerPos( playerid, X, Y, Z );
playertextid[playerid] = CreatePlayer3DTextLabel(playerid,"Level:",0x008080FF,X,Y,Z,40.0);
format(string, sizeof(string), "Lygis: %d", pInfo[playerid][Lygis]);
Attach3DTextLabelToPlayer(playertextid[playerid],playerid,X,Y,Z); // tag mismatch
new string [128];
format(string,sizeof(string),"Lygis: %d", pInfo[playerid][Level]);
playertextid[playerid] = Create3DTextLabel(string,0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(playertextid[playerid],playerid,0.0, 0.0, 0.7);
Change:
pawn Код:
pawn Код:
|
Create3DTextLabel(playertextid[playerid],COLOR_BLUE,30.0,40.0,50.0,40.0,0);
Delete3DTextLabel(playertextid[playerid]);
new strings[128];
format(strings, sizeof(strings),"Punkti %d Nauda %d",GetPlayerScore(playerid),GetPlayerMoney(playerid));
tag[playerid] = Create3DTextLabel(strings,COLOR_BLUE,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(tag[playerid], playerid, 0.0, 0.0, 0.7);
public OnPlayerUpdate(playerid)
{
UpdatePlayer3DTextLabelText(playerid, playertextid[playerid], 0x008080FF, "Level: %d", pInfo[playerid][Lygis]);
new string [128];
format(string,sizeof(string),"Lygis: %d", pInfo[playerid][Level]);
playertextid[playerid] = Create3DTextLabel(string,0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
Update3DTextLabelText(playertextid[playerid], 0xFFFFFFFF, string);