help!!!!!!!!
#1

How do I get a player can only AFK Fik stopped after 10s?

I use this cmd to stay afk

Код:
{
    GetPlayerName(playerid, Name, 24);
	if (strcmp("/afk", cmdtext, true, 10) == 0)
	{
	    if(Afk[playerid]==0){
		Afk[playerid]=1;
		Timer[playerid] = SetTimer("SendMessage",100,0);
		SetPlayerVirtualWorld(playerid, 15);
		TogglePlayerControllable(playerid,0);
        format(string, sizeof(string), "%s this afk", Name);
        SendClientMessageToAll(0x33CCFFAA, string);
		}else{SendClientMessage(playerid,0xFF0000AA, "You're on AFK mode to exit type /exitafk");}
		return 1;
	}
Reply
#2

nobody knows how?
Reply
#3

pawn Код:
// somewhere on the bottom of your script
forward NoAFK(playerid);
public NoAFK(playerid);
{
   Afk[playerid] = 0;
}

// In Your Command
SetTimerEx("NoAFK", 10000, false, "d", playerid);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)