PDA

View Full Version : CreateDynamic3DTextLabel Not working


lulo356
21/01/2015, 08:17 PM
Hello,

I got an issue, i created for the /mask an CreateDynamic3DTextLabel But its not showing up when players do /mask
Can you maybe fix it for me?

CMD:mask(playerid, params[])
{
new string[128], playerb, Float: H, Float: A;
if(isStranged[playerid] == false)
{
isStranged[playerid] = true;
GetPlayerHealth(playerb, H); GetPlayerArmour(playerb, A);
SetPlayerAttachedObject(playerid, 1, 19037, 2, 10, 4.7, 0.0, 90, 90, 0);
SendClientMessage(playerid, COLOR_WHITE, "You have put on a mask! (/mask to remove it)");
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(i, playerid, 0);
format(string, sizeof(string), "Masked(%d)\nHealth: %d Armour: %d",i+14, H, A);
MaskLabel[i] = CreateDynamic3DTextLabel(string, GetPlayerColor(playerid), 0, 0, 0.200, 25, playerid,INVALID_VEHICLE_ID, 1, -1, -1, -1, 100.0);
}
}
else
{
isStranged[playerid] = false;
SendClientMessage(playerid, COLOR_WHITE, "You have removed your mask!");
if(IsPlayerAttachedObjectSlotUsed(playerid, 1)) RemovePlayerAttachedObject(playerid, 1);
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(i, playerid, 1);
DestroyDynamic3DTextLabel(MaskLabel[i]);
}
}
return 1;
}

Schneider
21/01/2015, 09:17 PM
You got the xyz-parameters wrong... Unless you want them to be at the coordinates 0, 0, 0.25 ?
CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 100.0);

lulo356
21/01/2015, 09:40 PM
Well, I did, but its showing up if two players are in the same range of each other, and it will lag and bug and its not destroying.

lulo356
22/01/2015, 09:29 AM
someone