Incorrect Display Of Text...
#1

Hello! I have a strange problem.

Код:
format(string, sizeof(string), "[%i] %s \n(PL)", playerid, PlayerName(playerid));
PlayerTEXT[playerid] = Create3DTextLabel(string, 0xEEFF99FF, 0.0, 0.0, 0.0, 15, 0, 1);
Attach3DTextLabelToPlayer(PlayerTEXT[playerid], playerid, 0.0, 0.0, 0.2);
PlayerData[playerid][Have3DText] = true;
It should attach text to the player, but attach it to pickup.
What's is wrong?
Reply
#2

What do you mean? The code attaches that 3d text to the specified players. Do you want to attach it to a pickup?

You can't do that. Instead you gotta specify the exact location where you've created the pickup in the create3dtextlabel
Reply
#3



It should be above the player's head.
Reply
#4

Код:
format(string, sizeof(string), "[%i] %s \n(PL)", playerid, PlayerName(playerid));
PlayerTEXT[playerid] = CreateDynamic3DTextLabel(string, 0xEEFF99FF,  0, 0, 0.39, 18.0, playerid, INVALID_VEHICLE_ID, 1);
PlayerData[playerid][Have3DText] = true;
Try this
Reply
#5

Код:
PlayerTEXT[playerid] = Create3DTextLabel(string, 0xEEFF99FF,  0, 0, 0.39, 18.0, playerid, INVALID_VEHICLE_ID, 1);
warning 202: number of arguments does not match definition

Unfortunately it does not work either.
Reply
#6

Quote:
Originally Posted by Michatex
Посмотреть сообщение
Код:
PlayerTEXT[playerid] = Create3DTextLabel(string, 0xEEFF99FF,  0, 0, 0.39, 18.0, playerid, INVALID_VEHICLE_ID, 1);
warning 202: number of arguments does not match definition

Unfortunately it does not work either.
Sorry, i updated the code. Please re-check the code which i given above.
Reply
#7

Thank you.
Reply
#8

use CreateDynamic3DTextLabel

PHP код:
if(IsValidDynamic3DTextLabel(PlayerTEXT[playerid])) DestroyDynamic3DTextLabel(PlayerTEXT[playerid]);
format(stringsizeof(string), "[%i] %s \n(PL)"playeridPlayerName(playerid));
PlayerTEXT[playerid] = CreateDynamic3DTextLabel(string0xEEFF99FF0.00.00.310.0playerid);
PlayerData[playerid][Have3DText] = true
Reply
#9

Quote:
Originally Posted by UFF
Посмотреть сообщение
Код:
format(string, sizeof(string), "[%i] %s \n(PL)", playerid, PlayerName(playerid));
PlayerTEXT[playerid] = CreateDynamic3DTextLabel(string, 0xEEFF99FF,  0, 0, 0.39, 18.0, playerid, INVALID_VEHICLE_ID, 1);
PlayerData[playerid][Have3DText] = true;
Try this
How about you explain your code and tell him what this means other than going around and just posting it?
Reply
#10

Quote:
Originally Posted by willbedie
Посмотреть сообщение
How about you explain your code and tell him what this means other than going around and just posting it?
What's there to explain?
I just made it CreateDynamic3DTextLabel instead of Create3DTextLabel to be easier since CreateDynamic3DTextLabel has Attach3DTextLabelToPlayer in itself. To destroy that label use DestroyDynamic3DTextLabel(PlayerTEXT[playerid]);
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)