textdraw that showing settimer
#1

i tried to do a textdraw that showing the settimer that i put in command.
but it is not working.
i did like that:

PHP код:
forward sd();
new 
rd;
new 
Text:Textdraw8;
forward bomber1();
public 
OnGameModeInit()
{
SetTimer("bomber1",1000,1);
Textdraw8 TextDrawCreate(255,23"Time till carrier will bomb: --");
}
command(platebombplayeridparams[])
{
if(
gTeam[playerid] == Allied)
{
if( 
PlayerToPoint10playerid2619.00000000,442.39999390,12.00000000 ) )
{
    new 
pname[128];
    
GetPlayerName(playeridpnamesizeof(pname));
    new 
string[128];
    
format(stringsizeof(string), "%s(%d) has plated bomb on russian carrier."pnameplayerid);
    
SendClientMessageToAll(Yellowstring);
    
rd SetTimer("sd"300000false);
    new 
newtext[41];
    
format(newtextsizeof(newtext), "Time till carrier will bomb: %d"rd);
    
TextDrawSetString(Textdraw8newtext);
    
TextDrawShowForAll(Textdraw8);
}
}
return 
1;
}
public 
sd()
{
// this i will update later.
    
return 1;
}
public 
bomber1()
{
    new 
newtext[41];
    
format(newtextsizeof(newtext), "Time till carrier will bomb: %d"rd);
    
TextDrawSetString(Textdraw8newtext);
    
TextDrawShowForAll(Textdraw8);
    return 
1;

Reply


Messages In This Thread
textdraw that showing settimer - by marik1322 - 12.03.2012, 20:51
Re: textdraw that showing settimer - by Mike_Peterson - 12.03.2012, 21:08
Re: textdraw that showing settimer - by marik1322 - 12.03.2012, 21:35

Forum Jump:


Users browsing this thread: 1 Guest(s)