SA-MP Forums Archive
Text Draw [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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Text Draw [HELP] (/showthread.php?tid=83483)



Text Draw [HELP] - gytisx - 25.06.2009

Hi, I'm creating with text draws...Text draws often are destroying... I dont know why... I dont destroy it... WHo can help me correct this bug?

Thanks

Gytisx


Re: Text Draw [HELP] - ERO - 25.06.2009

How is the codec?


Re: Text Draw [HELP] - Correlli - 25.06.2009

You probably messed something with textdraws. We can't help if you can't show your script.


Re: Text Draw [HELP] - gytisx - 25.06.2009

Код:
//==============================================================================
public Driftas(playerid)
{
	if(driftInfo[playerid][DriftCount] < 1)
	{
		GameTextForPlayer(playerid,"~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~ GO! ~g~-",1000,3);
		TogglePlayerControllable(playerid,1);
		driftInfo[playerid][DriftCp][0] = SetPlayerRaceCheckpoint(playerid,2,-302.0554,1511.0476,75.0219,0.0,0.0,0.0,10); // finish
		driftInfo[playerid][DriftCount] = 4;
		KillTimer(driftInfo[playerid][DriftoTimer]);
		driftInfo[playerid][DriftoClockTimer] = SetTimerEx("DriftoClock",1000,true,"d",playerid);
		driftInfo[playerid][DriftoCpTimer] = SetTimerEx("DriftoCpCount",100,true,"d",playerid);
	} else {
		driftInfo[playerid][DriftCount]--;
		new DriftStr[128];
		format(DriftStr,128,"~n~~n~~n~~n~~n~~n~~n~~n~~g~-~y~ %d ~g~-",driftInfo[playerid][DriftCount]);
		GameTextForPlayer(playerid,DriftStr,1000,3);
	}
	return 1;
}
//==============================================================================
public DriftoClock(playerid)
{
	  driftInfo[playerid][DriftClockSekundes]++;
	  new DriftClockStr[128];
  	TextDrawHideForPlayer(playerid, Text:driftInfo[playerid][DriftClockTextDraw]);
  	 	format(DriftClockStr,128," Laikas: %d min. %d sek.",driftInfo[playerid][DriftClockMinutes], driftInfo[playerid][DriftClockSekundes]);
  	driftInfo[playerid][DriftClockTextDraw] = TextDrawCreate(206.000000,379.000000,DriftClockStr);
		TextDrawAlignment(driftInfo[playerid][DriftClockTextDraw],0);
		TextDrawBackgroundColor(driftInfo[playerid][DriftClockTextDraw],0xffffffff);
		TextDrawFont(driftInfo[playerid][DriftClockTextDraw],2);
		TextDrawLetterSize(driftInfo[playerid][DriftClockTextDraw],0.699999,2.299999);
		TextDrawColor(driftInfo[playerid][DriftClockTextDraw],0x000000ff);
	
		if(driftInfo[playerid][DriftClockSekundes] == 59)
	  {
	  driftInfo[playerid][DriftClockSekundes] = 0;
	  driftInfo[playerid][DriftClockSekundes]++;
	  driftInfo[playerid][DriftClockMinutes] = (driftInfo[playerid][DriftClockMinutes] +1);

		TextDrawHideForPlayer(playerid, Text:driftInfo[playerid][DriftClockTextDraw]);
  	 	format(DriftClockStr,128," Laikas: %d min. %d sek.",driftInfo[playerid][DriftClockMinutes], driftInfo[playerid][DriftClockSekundes]);
   	driftInfo[playerid][DriftClockTextDraw] = TextDrawCreate(206.000000,379.000000,DriftClockStr);
		TextDrawAlignment(driftInfo[playerid][DriftClockTextDraw],0);
		TextDrawBackgroundColor(driftInfo[playerid][DriftClockTextDraw],0xffffffff);
		TextDrawFont(driftInfo[playerid][DriftClockTextDraw],2);
		TextDrawLetterSize(driftInfo[playerid][DriftClockTextDraw],0.699999,2.299999);
		TextDrawColor(driftInfo[playerid][DriftClockTextDraw],0x000000ff);
 		}
		return 1;
}
//==============================================================================
public DriftoCpCount(playerid)
{
    new DriftCpStr[128];
    TextDrawHideForPlayer(playerid, Text:driftInfo[playerid][DriftCpTextDraw]);
    format(DriftCpStr,128,"%d/23",driftInfo[playerid][DriftCpCount]);
    driftInfo[playerid][DriftCpTextDraw] = TextDrawCreate(530.000000,364.000000,DriftCpStr);
		TextDrawAlignment(driftInfo[playerid][DriftCpTextDraw],0);
		TextDrawBackgroundColor(driftInfo[playerid][DriftCpTextDraw],0xffffffff);
		TextDrawFont(driftInfo[playerid][DriftCpTextDraw],2);
		TextDrawLetterSize(driftInfo[playerid][DriftCpTextDraw],0.799999,4.899998);
		TextDrawColor(driftInfo[playerid][DriftCpTextDraw],0x000000ff);
		TextDrawShowForPlayer(playerid, Text:driftInfo[playerid][DriftCpTextDraw]);
		return 1;
}
//==============================================================================
This is code...


Re: Text Draw [HELP] - gytisx - 25.06.2009

Who can help? Sorry about my flood...


Re: Text Draw [HELP] - karolis1478 - 26.06.2009

Help and i need this.


Re: Text Draw [HELP] - gytisx - 26.06.2009

Quote:
Originally Posted by karolis1478
Help and i need this.
Hey, dont copy my code... ;(


Re: Text Draw [HELP] - karolis1478 - 26.06.2009

Quote:
Originally Posted by gytisx
Quote:
Originally Posted by karolis1478
Help and i need this.
Hey, dont copy my code... ;(
i don't copy your'e code just and i hawe this problem.


Re: Text Draw [HELP] - gytisx - 27.06.2009

Quote:
Originally Posted by karolis1478
Quote:
Originally Posted by gytisx
Quote:
Originally Posted by karolis1478
Help and i need this.
Hey, dont copy my code... ;(
i don't copy your'e code just and i hawe this problem.
Oh ok WHo can help?


Re: Text Draw [HELP] - Joris123 - 27.06.2009

dude make self a code