Need Help
#7

I think it might be in this area:
pawn Код:
TextDrawSetString(txtTimeDisp,timestr);
txtTimeDisp = TextDrawCreate(600.0,25.0,"SRC");
Notice how TextDrawSetString is happening before you have even created the textdraw?
Try replacing it with this:
pawn Код:
txtTimeDisp = TextDrawCreate(600.0,25.0,"SRC");
TextDrawSetString(txtTimeDisp,timestr);
EDIT: Sorry noticed a few errors in the last script I posted. The full code should look something like this:
pawn Код:
new Text:txtTimeDisp;
new Text:txtTimeDisp2;
new timestr[32];
             
public OnGameModeInit()
{        
txtTimeDisp = TextDrawCreate(600.0,25.0,"SRC");
TextDrawUseBox(txtTimeDisp, 0);
TextDrawFont(txtTimeDisp, 2);
TextDrawSetShadow(txtTimeDisp,1);
TextDrawSetOutline(txtTimeDisp,1);
TextDrawBackgroundColor(txtTimeDisp,gray);
TextDrawColor(txtTimeDisp,black);
TextDrawAlignment(txtTimeDisp,3);
TextDrawSetString(txtTimeDisp,timestr);
TextDrawLetterSize(txtTimeDisp,0.9,1.5);
txtTimeDisp2 = TextDrawCreate(634.000000, 435.000000,"www.src-community.com");
TextDrawUseBox(txtTimeDisp2,0);
TextDrawFont(txtTimeDisp2, 2);
TextDrawSetShadow(txtTimeDisp2,1);
TextDrawSetOutline(txtTimeDisp2,1);
TextDrawBackgroundColor(txtTimeDisp2,gray);
TextDrawColor(txtTimeDisp2,black);
TextDrawAlignment(txtTimeDisp2,3);
TextDrawLetterSize(txtTimeDisp2,0.500000, 1.000000);
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
TextDrawHideForPlayer(playerid,txtTimeDisp);
TextDrawHideForPlayer(playerid,txtTimeDisp2);
return 1;
}
Reply


Messages In This Thread
Need Help - by Eiy Mard - 11.07.2012, 15:17
Re: Need Help - by clarencecuzz - 11.07.2012, 15:21
Re: Need Help - by Eiy Mard - 11.07.2012, 15:39
Re: Need Help - by Eiy Mard - 11.07.2012, 16:17
Re: Need Help - by clarencecuzz - 11.07.2012, 16:20
Re: Need Help - by Eiy Mard - 12.07.2012, 06:52
Re: Need Help - by clarencecuzz - 12.07.2012, 07:14
Re: Need Help - by Eiy Mard - 12.07.2012, 07:27
Re: Need Help - by clarencecuzz - 12.07.2012, 07:31
Re: Need Help - by Littlehelper - 12.07.2012, 07:57

Forum Jump:


Users browsing this thread: 1 Guest(s)