31.07.2013, 15:49
Hello, i have a Donating System on my server.
Each Donators should have a 3D Text Label above their head, but they can also turn it off by using /vipsettings.
Now the problem is, I don't have any errors on the script, but for some reason the Text doesn't attach to head.
Creating the variable
This allows to make the text visible or unvisible. (I have a Dialog System)
This is when player connects the server and he's Donator.
When the player spawns.
When player disconnects.
Each Donators should have a 3D Text Label above their head, but they can also turn it off by using /vipsettings.
Now the problem is, I don't have any errors on the script, but for some reason the Text doesn't attach to head.
Creating the variable
pawn Код:
new Text3D:vip_text[MAX_PLAYERS];
pawn Код:
switch(itemid)
{
case 1:
{
if(attach_vip[playerid] == true)
{
attach_vip[playerid] = false;
Update3DTextLabelText(vip_text[playerid], 0xFFFFFFFF, " ");
}
else
{
attach_vip[playerid] = true;
Update3DTextLabelText(vip_text[playerid], COLOR_GROUP, "Donator Player");
}
}
}
pawn Код:
vip_text[playerid] = Create3DTextLabel("Donating Player", COLOR_GROUP, 0.0, 0.0, 0.0, 40.0, 0, 0);
pawn Код:
if(attach_vip[playerid] == true)
{
Attach3DTextLabelToPlayer(vip_text[playerid], playerid, 0.0, 0.0, 0.5);
}
pawn Код:
Delete3DTextLabel(vip_text[playerid]);
vip_text[playerid] = Text3D:INVALID_3DTEXT_ID;