player afk 3dtextlable problem
#1

hi guys so i create this system for showing other players how many time a paused player has been away from the keyboard [on his head]:

Code:
// ======= AFK LABLE ====== //
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
          if(IsPlayerPaused(i) == true)
          {
                 afktimer[i]++;
                   if(afktimer[i] > 0)
                   {
                            new stra[200];
	 		    format(stra,sizeof(stra),"AFK : %d Sec",afktimer[i]);
		 	    afklable[i] = Create3DTextLabel(str, COLOR_CYAN, 30.0, 40.0, 50.0, 40.0, 0);
			    Attach3DTextLabelToPlayer(afklable[i], i, 0.0, 0.0, 0.5);
     		   }
           }
    }
// ======= AFK LABLE ====== //

// ======= AFK LABLE - REMOVE ====== //
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
			 if(IsPlayerPaused(i) != true && afktimer[i] > 0)
			 {
    		         afktimer[i] = 0;
			 Delete3DTextLabel(afklable[i]);
			 }
	}
// ======= AFK LABLE - REMOVE ====== //
but i have a problem 3dtext will not update the attached text , its looks like a spam , AFK : time on another AFK time i mean the older will not disappear and new timer with new seconds will be on older one!!
hope you got what im saying , sorry for my bad english please help me with this <3
Reply


Messages In This Thread
player afk 3dtextlable problem - by PoniStar - 17.11.2018, 15:45
Re: player afk 3dtextlable problem - by Joe Staff - 17.11.2018, 16:59
Re: player afk 3dtextlable problem - by PoniStar - 17.11.2018, 17:25
Re: player afk 3dtextlable problem - by PoniStar - 17.11.2018, 17:48
Re: player afk 3dtextlable problem - by NaS - 17.11.2018, 18:16
Re: player afk 3dtextlable problem - by Joe Staff - 17.11.2018, 18:44
Re: player afk 3dtextlable problem - by PoniStar - 17.11.2018, 18:50
Re: player afk 3dtextlable problem - by PoniStar - 17.11.2018, 19:03

Forum Jump:


Users browsing this thread: 1 Guest(s)