09.06.2012, 07:09
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:
then under OnGameModeInit I just have a simple SetTimer("UpdateStats",3000,1)
Under OnPlayerSpawn I show the Textdraw TextDrawShowForPlayer(playerid,TotalStats[playerid]);
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);
Under OnPlayerSpawn I show the Textdraw TextDrawShowForPlayer(playerid,TotalStats[playerid]);