SA-MP Forums Archive
Headtext over the Head - 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: Headtext over the Head (/showthread.php?tid=381230)



Headtext over the Head - Blackazur - 28.09.2012

How can i scripting this, that Players can make /headtext with different Colors we Blue, Yellow, Green, White, Red, Cyan?


Re: Headtext over the Head - BlacK_RiDeR - 28.09.2012

I Can Make For You ..


AW: Headtext over the Head - Blackazur - 28.09.2012

Then give me the Command, it were be nice, because i dont have Idea how to make that i know with 3d text label but not other.


Re: Headtext over the Head - Emmet_ - 28.09.2012

pawn Код:
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#include <sscanf2>

new Text3D:MyLabel[MAX_PLAYERS];

stock AttachHeadColor(playerid, color, text[])
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    MyLabel[playerid] = Create3DTextLabel(text, color, x, y, z + 1.0, 10.0, 0);
    Attach3DTextLabelToPlayer(MyLabel[playerid], playerid, 0.0, 0.0, 1.0);
    return 1;
}
 
CMD:headtext(playerid, params[])
{
    new color[12], text[128];
    if (sscanf(params, "s[12]s[128]", color, text))
    {
        SendClientMessage(playerid, 0xAFAFAFFF, "USAGE: /headtext [color] [text]");
        return 1;
    }
    if (strcmp(color, "blue", true) == 0) AttachHeadColor(playerid, 0x0000FFFF, text);
    if (strcmp(color, "yellow", true) == 0) AttachHeadColor(playerid, 0xFFFF00FF, text);
    if (strcmp(color, "green", true) == 0) AttachHeadColor(playerid, 0x00FF00FF, text);
    if (strcmp(color, "white", true) == 0) AttachHeadColor(playerid, 0xFFFFFFFF, text);
    if (strcmp(color, "red", true) == 0) AttachHeadColor(playerid, 0xFF0000FF, text);
    if (strcmp(color, "cyan", true) == 0) AttachHeadColor(playerid, 0x33CCFFFF, text);
    SendClientMessage(playerid, 0xFFFF00FF, "Text attached to head (type /removetext to remove it).");
    return 1;
}

CMD:removetext(playerid, params[])
{
    Delete3DTextLabel(MyLabel[playerid]);
    SendClientMessage(playerid, 0xFFFF00FF, "Text removed.");
    return 1;
}



Re: Headtext over the Head - BlacK_RiDeR - 28.09.2012

What Text Should Attach in The Top Of The Head ??