11.10.2012, 20:34
No he don't need to do another useless variable or boolean enough would be GetTickCount function.
Show "HideAnnHere" public callback.
pawn Код:
public OnGameModeInit()
{
textann = TextDrawCreate(350.0, 150.0, " ");
TextDrawLetterSize(textann,1.0 ,2.5);
TextDrawTextSize(textann, 800.0, 500.6);
TextDrawBackgroundColor(textann, 0x000000FF);
TextDrawAlignment(textann,2);
TextDrawFont(textann, 3);
TextDrawColor(textann, 0xffffffff);
TextDrawSetOutline(textann, 1);
TextDrawSetProportional(textann, 1);
return true;
}
dcmd_announce(playerid, params[])
{
if(AccInfo[playerid][Level] <= 1)
{
return ErrorMessages(playerid, 7);
}
if(!params[0])return SendClientMessage(playerid, red, "Usage: /announce [text]");
TextDrawSetString(textann, params);
TextDrawShowForAll(textann);
SetTimerEx("HideAnnHere", 4000, false);
return true;
}