SA-MP Forums Archive
Can somebody help me out with 3dlabel? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Can somebody help me out with 3dlabel? (/showthread.php?tid=472968)



Can somebody help me out with 3dlabel? - Alex_Obando - 31.10.2013

pawn Код:
CMD:addtexttoplayer(playerid, params[])
{
    new pID;
    new str[246];
    new string[246];
    new text[246];

    if(sscanf(params,"us", pID,str,text)) return SendClientMessage(playerid, -1, "USAGE: /addtexttoplayer [playerid/playername] [text]");
    else if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, -1, "That player is not online.");

    new Text3D:label = Create3DTextLabel(text, 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    format(string,sizeof(string), "Create3DTextLabel(\"%s\", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);",text);
    Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
    return 1;
}
Not working :/


Re: Can somebody help me out with 3dlabel? - DanishHaq - 31.10.2013

pawn Код:
CMD:addtexttoplayer(playerid, params[])
{
    new pID, text[246];

    if(sscanf(params, "us[246]", pID, text)) return SendClientMessage(playerid, -1, "USAGE: /addtexttoplayer [playerid/playername] [text]");
    if(pID == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, "That player is not online.");
   
    new string[246];
    new Text3D:label = Create3DTextLabel(text, 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
    format(string, sizeof(string), "Create3DTextLabel(\"%s\", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);",text); // I have no idea what this is for, it's not even being used
    Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
    return 1;
}



Respuesta: Can somebody help me out with 3dlabel? - Alex_Obando - 31.10.2013

and to attach it to my current car?


Re: Can somebody help me out with 3dlabel? - Pottus - 31.10.2013

That code will cause problems because you lose your reference to the label and won't be able to delete it.