14.02.2012, 17:28
I can't be assed to create multiple threads, so heres another question:
I got everything working, besides when the text updates, it draws upon the old text.
I got everything working, besides when the text updates, it draws upon the old text.
pawn Код:
new count;
new newCount[128];
new Text:mytext;
public SurvivedTime(playerid)
{
count = count + 1;
format(newCount,sizeof(newCount), "The murderer has stayed alive for %d seconds!",count);
mytext = TextDrawCreate(150.0,380.0,newCount); // Create the textdraw
TextDrawColor(mytext, COLOR_YELLOW); // Set the color of the text
TextDrawSetOutline(mytext,1); // Set the outline (stroke) of the text
TextDrawSetShadow(mytext,0); // Set the shadow of the text
TextDrawFont(mytext,2); // Set the Font
TextDrawLetterSize(mytext,0.3,0.8); // Set the letter size
TextDrawShowForPlayer(playerid,mytext); // Show the textdraw to a certain player
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/startround", true) == 0){
SetTimerEx("SurvivedTime", 1000, true, "i", playerid);
return 1;
}
return 0;
}