Updating label
#1

I have a gangzone system which creates a label showing zone name and which team owns it (Ex: Area69 - Owned by Usa).

pawn Код:
new label[100];
        format(label, sizeof(label), "ZONE: %i - %s \nOwned by: %s", i, gCaptureZone[i][zone_Name], gTeamData[gCaptureZone[i][zone_Owner]][team_Name]);
        CreateDynamic3DTextLabel(label, COLOR_GOLD, gCaptureZone[i][zone_CP][0], gCaptureZone[i][zone_CP][1], gCaptureZone[i][zone_CP][2], 50.0);
The label works, but i want to update text "owned by" after a player captured that zone from another team.

If im from team russia and i capture that zone, it should update the label with "zone area69 owned by russia"

How to make it with UpdateDynamic3dTextLabel? Thanks.
Reply
#2

Код:
UpdateDynamic3DTextLabelText(STREAMER_TAG_3D_TEXT_LABELid, color, const text[]``)
Put that function in the part of your system where the players capture the zone so it triggers when it happens. All you have to do is to change the gTeamData[gCaptureZone[i][zone_Owner]][team_Name] string to the name of the group the players capturing are in.
Reply
#3

Can you make me an example?
Reply
#4

Bump
Reply
#5

Did you make that?
Or you use somebody else's
Reply
#6

What
Reply
#7

Quote:
Originally Posted by zedshadowzw
Посмотреть сообщение
Did you make that?
Or you use somebody else's




PHP код:
//create label
new label[100], Text3D:mylabel;
format(labelsizeof(label), "ZONE: %i - %s \nOwned by: %s"igCaptureZone[i][zone_Name], gTeamData[gCaptureZone[i][zone_Owner]][team_Name]);
mylabel CreateDynamic3DTextLabel(labelCOLOR_GOLDgCaptureZone[i][zone_CP][0], gCaptureZone[i][zone_CP][1], gCaptureZone[i][zone_CP][2], 50.0);
// update it
UpdateDynamic3DTextLabelText(mylabelCOLOR_GOLD"here goes my updated text"); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)