[Ajuda] Й possivel por uma string num: Attach3DTextLabelToPlayer ?
#1

Estou algumas dъvidas pois, gostaria de integrar uma string na label, e nгo sei como fazer.
Reply
#2

Logico!
Reply
#3

Quote:
Originally Posted by paulor
Посмотреть сообщение
Logico!
Pedia entгo um exemplo, se fosse possнvel.
Reply
#4

pawn Код:
new string[128], nome[24];
GetPlayerName(playerid, nome, 24);

format(string, sizeof(string),  "blablabla meu id: %d e meu nome й %s", playerid, nome);
label[playerid] = Create3DTextLabel(string, 0xFF0000, 0.0, 0.0, 0.0, 50.0, 0);
Reply
#5

pawn Код:
new Text3D: PtText;
PtText = Create3DTextLabel(STRING, COR, X, Y, Z, DIST, VW, TLOS);
Attach3DTextLabelToPlayer(PtText, playerid, OffsX, OffsY, OffsZ);
Reply
#6

Nгo funciona, eu usei uma mistura de dois.
A minha ideia era por em cima da cabeзa do player uma string random para todas as pessoas.
Reply
#7

Quote:
Originally Posted by noobre
Посмотреть сообщение
Nгo funciona, eu usei uma mistura de dois.
A minha ideia era por em cima da cabeзa do player uma string random para todas as pessoas.
Posta entгo, pois se vc nгo ta conseguindo nois te ajudaremos...
Reply
#8

pawn Код:
public OnPlayerSpawn(playerid)
{
    new string[128];
    new rand = 1 + random(49);
    PlayerInfo[playerid][pPrisioneiro] = rand;
   
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        format(string, sizeof(string),  "prisioneiro: %d", rand);
        Create3DTextLabel(string, 0xFF0000, 0.0, 0.0, 0.0, 50.0, 0);
    }
Reply
#9

Quote:
Originally Posted by noobre
Посмотреть сообщение
pawn Код:
public OnPlayerSpawn(playerid)
{
    new string[128];
    new rand = 1 + random(49);
    PlayerInfo[playerid][pPrisioneiro] = rand;
   
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        format(string, sizeof(string),  "prisioneiro: %d", rand);
        Create3DTextLabel(string, 0xFF0000, 0.0, 0.0, 0.0, 50.0, 0);
    }
pawn Код:
public OnPlayerSpawn(playerid) {
    new Str[24], Rand = ++random(49), Text3D: PtText;
    PlayerInfo[playerid][pPrisioneiro] = Rand;
    format(Str, sizeof(Str),  "Prisioneiro: %i", Rand);
    PtText = Create3DTextLabel(Str, 0xFF0000FF, 0.0, 0.0, 0.0, 50.0, 0);
    Attach3DTextLabelToPlayer(PtText, playerid, 0.0, 0.0, 0.0);
    return 1;
}
Reply
#10

pawn Код:
C:\Users\NOOBRE\Desktop\x\gamemodes\x.pwn(1361) : error 022: must be lvalue (non-constant)
pawn Код:
new string[256], Rand = ++random(50), Text3D: PtText;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)