Help nobody can help me :s !
#1

How can i hook up spliffys 3dlabel nametag filterscript with my command here, i used his filterscript but i have a mask command how can i update the 3dtextlabel so it becomes another text when i take my mask on and then when i take it off it shall go back to the usual name label.
My mask script
pawn Code:
pawn Код:
CMD:mask(playerid, params[])
{
        new string[150], rand = 2 + random(20);
        MaskID[playerid] = rand;
        if(strcmp(params, "on", false) == 0) {
            if(PlayerInfo[playerid][pMaskO] == 0) return SendClientMessage(playerid,red, "error: no mask !");
            if(PlayerInfo[playerid][pMask] == 1) return SendClientMessage(playerid,red, "ur mask is on !");
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    ShowPlayerNameTagForPlayer(i, playerid, 0);
                }
            }
            GameTextForPlayer(playerid,"~g~MASK ON",1000,1);
            format(string, sizeof(string), "%d", MaskID[playerid]);
            NameText[playerid] = CreateDynamic3DTextLabel(string, 0x77777777, 0, 0, -20, 25, playerid);
            Streamer_SetFloatData(STREAMER_TYPE_3D_TEXT_LABEL, NameText[playerid] , E_STREAMER_ATTACH_OFFSET_Z, 0.25);
            PlayerInfo[playerid][pMask] = 1;
        }
        else if(strcmp(params, "off", false) == 0) {
            if(PlayerInfo[playerid][pMaskO] == 0) return SendClientMessage(playerid,red, "error: no mask !");
            else if(PlayerInfo[playerid][pMask] == 1) return SendClientMessage(playerid,red, "ur mask is off !");
            DestroyDynamic3DTextLabel(NameText[playerid]);
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    ShowPlayerNameTagForPlayer(i, playerid, 1);
                }
            }
            GameTextForPlayer(playerid,"~r~MASK OFF",1000,1);
            MaskID[playerid] = 0;
            PlayerInfo[playerid][pMask] = 0;
        }
        else return SendClientMessage(playerid, COLOR_GREY, "USAGE: /mask (off, on)");
        return 1;
}
Repping for the one who helps me ! here is spliffys fs https://sampforum.blast.hk/showthread.php?tid=468638
Reply
#2

I didn't really get what you mean but I believe you want to change the 3DTextLabel string instead of number

Edit this line.
pawn Код:
format(string, sizeof(string), "%d", MaskID[playerid]);
Reply
#3

Cant really see whats bothering you tho i mean the mask script is fine
Reply
#4

I want to update the 3dtextlabel so it becomes the 'MaskID' above his head when he puts on the mask but i cannot update it because i dont know how. In spliffys script he has removed the usual sa-mp nametag above players head and put his own 3dtextlabel above their head like create3dtextlabel and then attach it to them. I want to update it so when he puts the mask on it changes to 'MaskID' and when he puts it off it changes back to spliffys attached 3dtextlabel (Their name)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)