Incorrect Display Of Text... -
Michatex - 10.09.2018
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?
Re: Incorrect Display Of Text... -
ShihabSoft - 10.09.2018
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
Re: Incorrect Display Of Text... -
Michatex - 10.09.2018
It should be above the player's head.
Re: Incorrect Display Of Text... -
UFF - 10.09.2018
Код:
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
Re: Incorrect Display Of Text... -
Michatex - 10.09.2018
Код:
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.
Re: Incorrect Display Of Text... -
UFF - 10.09.2018
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.
Re: Incorrect Display Of Text... -
Michatex - 10.09.2018
Thank you.
Re: Incorrect Display Of Text... -
jhonel - 10.09.2018
use CreateDynamic3DTextLabel
PHP код:
if(IsValidDynamic3DTextLabel(PlayerTEXT[playerid])) DestroyDynamic3DTextLabel(PlayerTEXT[playerid]);
format(string, sizeof(string), "[%i] %s \n(PL)", playerid, PlayerName(playerid));
PlayerTEXT[playerid] = CreateDynamic3DTextLabel(string, 0xEEFF99FF, 0.0, 0.0, 0.3, 10.0, playerid);
PlayerData[playerid][Have3DText] = true;
Re: Incorrect Display Of Text... -
solstice_ - 10.09.2018
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?
Re: Incorrect Display Of Text... -
UFF - 10.09.2018
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]);