12.07.2012, 07:14
I think it might be in this area:
Notice how TextDrawSetString is happening before you have even created the textdraw?
Try replacing it with this:
EDIT: Sorry noticed a few errors in the last script I posted. The full code should look something like this:
pawn Код:
TextDrawSetString(txtTimeDisp,timestr);
txtTimeDisp = TextDrawCreate(600.0,25.0,"SRC");
Try replacing it with this:
pawn Код:
txtTimeDisp = TextDrawCreate(600.0,25.0,"SRC");
TextDrawSetString(txtTimeDisp,timestr);
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;
}