Label - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Label (
/showthread.php?tid=111045)
Label -
armyoftwo - 29.11.2009
Код:
new rank = GetPlayerRank(playerid);
Create3DTextLabel("Rank: %s",0x008080FF,-2062.5583,237.4662,37.7149,40.0,0, rank);
It shows this:
Re: Label -
Joe Staff - 29.11.2009
It sure does show that.
Leanr how to use
FORMAT.
Re: Label -
Marcel - 29.11.2009
pawn Код:
new rank = GetPlayerRank(playerid),
string[ 64 ];
format(string, sizeof(string), "Rank: %s", rank);
Create3DTextLabel(string,0x008080FF,-2062.5583,237.4662,37.7149,40.0,0);
I suggest you to read this:
https://sampwiki.blast.hk/wiki/Format
Re: Label -
armyoftwo - 29.11.2009
*removed the code*
Re: Label -
armyoftwo - 29.11.2009
anyone?
Re: Label -
KIDUL - 29.11.2009
Код:
new str[128];
new PR = PInfo[playerid][Rank];
format(str, 128, "Rank: %d: \"%s\"", PR, RankInfo[PR][RName]);
new attach[MAX_PLAYERS];
attach[playerid] = Create3DTextLabel(str,0x008080FF,-2062.5583,237.4662,37.7149,40.0,0); // ERROR LINE
Attach3DTextLabelToPlayer(attach[playerid],playerid,0,0,0.30);
Re: Label -
armyoftwo - 29.11.2009
Last 2 lines tag mismatches i checked everything but i cant find solution :/
Re: Label -
Babul - 30.11.2009
one word: new.
Код:
new attach[playerid] = Create3DTextLabel(str,0x008080FF,-2062.5583,237.4662,37.7149,40.0,0);
if that works, and u want that rank displayed for all players, then try that line at top in your script:
Код:
new attach[MAX_PLAYERS][32] = Create3DTextLabel(str,0x008080FF,-2062.5583,237.4662,37.7149,40.0,0);
it will create an array for all players, 32 should be enough for a maximum namelenght of 20 characters in sa-mp, but maybe u want to add some name/clan-tags
Re: Label -
armyoftwo - 30.11.2009
removed the code*