[Ajuda] Sistema Afk
#1

galera seguinte quando eu fico um tempo sem mover eu setei para o player ficar afk mais , o certo seria ficar player afk encima da cabeзa dele fica na cabeзa das outras pessoas e nгo na minha poderia ajudar ?

Код HTML:
	for (new i = 0; i < MAX_PLAYERS; i++)
	{
		if (IsPlayerConnected(i))
		{
			//
			ResetPlayerMoney(i);
			GivePlayerMoney(i, GetPlayerGrana(i));
			GetPlayerPos(i, PlayerCurrentPos[0], PlayerCurrentPos[1], PlayerCurrentPos[2]);
			if (!floatcmp(PlayerCurrentPos[0], PlayerLastPos[i][LastX]) && !floatcmp(PlayerCurrentPos[1], PlayerLastPos[i][LastY]))
			{
				PlayerAfkTicks[i]++;
			}
			else
			{
				PlayerAfkTicks[i] = 0;
			}
			PlayerLastPos[i][LastX] = PlayerCurrentPos[0];
			PlayerLastPos[i][LastY] = PlayerCurrentPos[1];
			PlayerLastPos[i][LastZ] = PlayerCurrentPos[2];
			if (PlayerAfkTicks[i] == MAX_IDLE_TIME * 40)
			{
				AFK[i] = 1;
				SetCameraBehindPlayer(i);
				TogglePlayerControllable(i, 1);
				TextDrawShowForPlayer(i, AfkText);
				TextDrawShowForPlayer(i, AfkBackText);
    			new Text3D:label = Create3DTextLabel("{00CC00}•Jogador AFK•", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
				new playerid = Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
			}
			//
			new aname[MAX_PLAYER_NAME];
			GetPlayerName(i, aname, sizeof(aname));
			format(file, sizeof(file), PASTA_CONTAS, aname);
			new Float: health;
			GetPlayerHealth(i, health);
			if (dini_Int(file, "usoudroga") == 1)
			{
				SetPlayerHealth(i, health - 1);
			}
		}
	}
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)