problem with textdraw - 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: problem with textdraw (
/showthread.php?tid=317262)
problem with textdraw -
_ReloadeD_ - 10.02.2012
I make 4 textdraws and after I connect it disapear........
Код:
//------------------------------------------------------------------------------
new Hour, Minute, Second;new time[20]; gettime(Hour, Minute, Second);
format(time, sizeof(time), "%d:%d:%d",time);
TextdrawTime = TextDrawCreate(551.000000, 4.000000, time);
TextDrawBackgroundColor(TextdrawTime, 65535);
TextDrawFont(TextdrawTime, 2);
TextDrawLetterSize(TextdrawTime, 0.420000, 2.099999);
TextDrawColor(TextdrawTime, -1);
TextDrawSetOutline(TextdrawTime, 1);
TextDrawSetProportional(TextdrawTime, 1);
//------------------------------------------------------------------------------
new year,month,day;new date[20];getdate(year, month, day);
format(date, sizeof(date), "%d-%d",day,month);
TextdrawDate = TextDrawCreate(490.000000, 5.000000, date);
TextDrawBackgroundColor(TextdrawDate, 16777215);
TextDrawFont(TextdrawDate, 2);
TextDrawLetterSize(TextdrawDate, 0.430000, 2.000000);
TextDrawColor(TextdrawDate, -1);
TextDrawSetOutline(TextdrawDate, 1);
TextDrawSetProportional(TextdrawDate, 1);
for(new i; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
TextDrawShowForPlayer(i, TextdrawTime);
TextDrawShowForPlayer(i, TextdrawDate);
}
}
Re: problem with textdraw -
MP2 - 10.02.2012
Put TextDrawShowForPlayer under OnPlayerConnect.
Re: problem with textdraw -
_ReloadeD_ - 10.02.2012
same thing.....
Re: problem with textdraw -
Nuke547 - 10.02.2012
Maybe you could put it under OnPlayerSpawn
Re: problem with textdraw -
_ReloadeD_ - 10.02.2012
Quote:
Originally Posted by Nuke547
Maybe you could put it under OnPlayerSpawn
|
Same.... there are only 2 textdraw that I see... and I have 4.....
Re: problem with textdraw -
_ReloadeD_ - 10.02.2012
Ok all working, I had a filterscript that use textdraw....
Re: problem with textdraw -
Twinki1993 - 10.02.2012
Put this OnPlayerSpawn
Quote:
TextDrawShowForPlayer(i, TextdrawTime);
TextDrawShowForPlayer(i, TextdrawDate);
|
Re: problem with textdraw -
RootKiller - 10.02.2012
Код:
format(time, sizeof(time), "%d:%d:%d",time);
O.o?
Re: problem with textdraw -
_ReloadeD_ - 10.02.2012
Quote:
Originally Posted by RootKiller
Код:
format(time, sizeof(time), "%d:%d:%d",time);
O.o?
|
This was a mistake XD
the correct one is this:
Код:
format(time, sizeof(time), "%d:%d:%d",hour,minutes,seconds);
Re: problem with textdraw -
MP2 - 10.02.2012
Quote:
Originally Posted by Twinki1993
Put this OnPlayerSpawn
|
That will give an undefined symbol (i) error. It'd be playerid.