Scripting help
#1

how do i create a 3d text label with timer? for example. i type /deagle and it will create a text above me saying: "i used the /deagle cmd" for 5 second.
Reply
#2

Fix you link to see exacutly what you want
Reply
#3

https://sampwiki.blast.hk/wiki/SetPlayerChatBubble ? this
REP mee if i Helped
Reply
#4

im not sure those though create a variable for 3dtextlabel and remove it through a timer later.
Reply
#5

Quote:
Originally Posted by arlindi
Посмотреть сообщение
no im talking about 3dtextlabel with timer
Reply
#6

First off.. do you you ZCMD?
Reply
#7

Quote:
Originally Posted by Chrillzen
Посмотреть сообщение
First off.. do you you ZCMD?
yes i do
Reply
#8

pawn Код:
new Text3D:Label[MAX_PLAYERS]; //Declaring a global variable.

CMD:deagle(playerid, params[])//Params[] (second parameter) is not necessary.
{
    //Give him Gun
 
    Label[playerid] = Create3DTextLabel("I used /deagle", -1, 0.0, 0.0, 0.0, 300, 0, 1);
    Attach3DTextLabelToPlayer(Label[playerid], playerid, 0.0, 0.0, 2.0)//Change 2.0 to change the height of the label.
    SetTimerEx("HideLabel", 5000, 0, "i", playerid);
    return 1;
}

forward HideLabel(playerid);
public HideLabel(playerid)
{
    Delete3DTextLabel(Label[playerid]);
}
You must have to add a check too, so that the timer won't be set twice before one is already running.
Reply
#9

Quote:
Originally Posted by De4dpOol
Посмотреть сообщение
pawn Код:
new Text3D:Label[MAX_PLAYERS]; //Declaring a global variable.

CMD:deagle(playerid, params[])//Params[] (second parameter) is not necessary.
{
    //Give him Gun
 
    Label[playerid] = Create3DTextLabel("I used /deagle", -1, 0.0, 0.0, 0.0, 300, 0, 1);
    Attach3DTextLabelToPlayer(Label[playerid], playerid, 0.0, 0.0, 2.0)//Change 2.0 to change the height <a
    SetTimerEx("HideLabel", 5000, 0, "i", playerid);
    return 1;
}

forward HideLabel(playerid);
public HideLabel(playerid)
{
    Delete3DTextLabel(Label[playerid]);
}
You must have to add a check too, so that the timer won't be set twice before one is already running.
i have one error

Quote:

error 001: expected token: ";", but found "-identifier-"

Код:
SetTimerEx("HideLabel", 5000, 0, "i", playerid);
Reply
#10

PHP код:
Attach3DTextLabelToPlayer(Label[playerid], playerid0.00.02.0); 
In the line above SetTimerEx was the mistake.

Mencent
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)