17.11.2018, 15:45
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]:
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
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 ====== //
hope you got what im saying , sorry for my bad english please help me with this <3