question - 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: question (
/showthread.php?tid=92330)
question -
Geekzor - 19.08.2009
how i can make the text draw with player score ?
i mean somewhere on screen is textdraw with player score how i can make that ?
Re: question -
Kanji_Suzuki - 20.08.2009
Here:
public OnGameModeInit()
Код:
new string[124];
format(string,sizeof(string),"Score 0");
Textdraw1 = TextDrawCreate(542.000000,433.000000,string);
TextDrawAlignment(Textdraw1,0);
TextDrawBackgroundColor(Textdraw1,0x000000ff);
TextDrawFont(Textdraw1,3);
TextDrawLetterSize(Textdraw1,0.299999,1.000000);
TextDrawColor(Textdraw1,0xffffffff);
TextDrawSetOutline(Textdraw1,1);
TextDrawSetProportional(Textdraw1,1);
TextDrawSetShadow(Textdraw1,1);
public OnplayerConnect(playerid);
Код:
TextDrawShowForPlayer(playerid,Textdraw1);
new string[124];
new score = GetPlayerScore(playerid);
format(string,sizeof(string),"score %d", score);
TextDrawSetString(Textdraw1,string);
In a 1 secsond timer
Код:
for(new i = 0; i < MAX_PLAYERS; i++)
new string[124];
new score = GetPlayerScore(i);
format(string,sizeof(string),"Score %d", score);
Tell me if thats it what you wanted
Re: question -
Correlli - 20.08.2009
◄╝J.Bull╚►, you're code is wrong.
It should be for all players:
pawn Код:
new Text:Textdraw1[MAX_PLAYERS];
TextDrawShowForPlayer(playerid,Textdraw1[playerid]);
// and so on.