Problem with text draw timer
#8

Thanks,

I have solved the problem, but not in the way i had hoped, I have put the timer under OnPlayerConnect, so now a timer gets created everytime someone connects, it seems to be working alright, but I don't know how this will effect me performance wise.

My goal is to have 1 global timer that updates every persons stats at the same time.

EDIT: Hellsphynx, I have just resorted to that, I will post my script now

OnPlayerconnect:

pawn Код:
public  OnPlayerConnect(playerid)
{
    TotalStats[playerid] = TextDrawCreate(10.000000,432.000000," Loading stats.... ");
    TextDrawColor(TotalStats[playerid],0xFFFFFFFF); //color of the words
    TextDrawUseBox(TotalStats[playerid],true);
    TextDrawBoxColor(TotalStats[playerid],0x000000AA);
    TextDrawFont(TotalStats[playerid],1);
    TextDrawSetOutline(TotalStats[playerid],true);
    TextDrawBackgroundColor(TotalStats[playerid],255); //color of the shadow
    TextDrawTextSize(TotalStats[playerid],640.0,480.0);
    TextDrawLetterSize(TotalStats[playerid],0.4,1.2);
then under OnGameModeInit I just have a simple SetTimer("UpdateStats",3000,1)

Under OnPlayerSpawn I show the Textdraw TextDrawShowForPlayer(playerid,TotalStats[playerid]);
Reply


Messages In This Thread
Problem with text draw timer - by mrcoolballs - 09.06.2012, 04:31
Re: Problem with text draw timer - by JhnzRep - 09.06.2012, 05:38
Re: Problem with text draw timer - by mrcoolballs - 09.06.2012, 06:21
Re: Problem with text draw timer - by JhnzRep - 09.06.2012, 06:45
Re: Problem with text draw timer - by mrcoolballs - 09.06.2012, 06:50
Re: Problem with text draw timer - by JhnzRep - 09.06.2012, 06:53
Re: Problem with text draw timer - by [KHK]Khalid - 09.06.2012, 07:05
Re: Problem with text draw timer - by mrcoolballs - 09.06.2012, 07:09
Re: Problem with text draw timer - by [KHK]Khalid - 09.06.2012, 07:40
Re: Problem with text draw timer - by mrcoolballs - 09.06.2012, 08:24

Forum Jump:


Users browsing this thread: 4 Guest(s)