Scripting help - 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: Scripting help (
/showthread.php?tid=569915)
Scripting help -
suni - 03.04.2015
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.
Re: Scripting help -
Bulgaria - 03.04.2015
Fix you link

to see exacutly what you want
Re: Scripting help -
arlindi - 03.04.2015
https://sampwiki.blast.hk/wiki/SetPlayerChatBubble ? this
REP mee if i Helped
Re: Scripting help -
Ritzy2K - 03.04.2015
im not sure those though create a variable for 3dtextlabel and remove it through a timer later.
Re: Scripting help -
suni - 04.04.2015
Quote:
Originally Posted by arlindi
|
no im talking about 3dtextlabel with timer
Re: Scripting help -
Chrillzen - 04.04.2015
First off.. do you you ZCMD?
Re: Scripting help -
suni - 04.04.2015
Quote:
Originally Posted by Chrillzen
First off.. do you you ZCMD?
|
yes i do
Re: Scripting help -
De4dpOol - 04.04.2015
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.
Re: Scripting help -
suni - 04.04.2015
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);
AW: Scripting help -
Mencent - 04.04.2015
PHP код:
Attach3DTextLabelToPlayer(Label[playerid], playerid, 0.0, 0.0, 2.0);
In the line above SetTimerEx was the mistake.
Mencent