Problem with other player
#1

Hello.

I have a problem, i dont know why.

I have system where after 60 seconds player dont have activity sending him in AFK mod.
Problem is here:

Im ID:0, server sending me in afk mod after no activity, but ID: 1 (friend) him not send in AFK mod.

Код:
	if(IsPlayerConnected(playerid))
	{
		if(IsLogged[playerid] == true)
		{
			if(inactivetime[playerid] > 60000 && AFKstatus[playerid] == 0)
			{
				AFKstatus[playerid] = 1;

        		new sstring[124];
        		format(sstring, sizeof(sstring), "[SERVER]: "COL_GREY"%s [ID:%d] je prebacen u AFK mod radi neaktivnosti 2 minute.", GetName(playerid), playerid);
        		SendMessageToStaff(COLOR_ADMINPURPLE, sstring);

	    		SendClientMessage(playerid, COLOR_ORANGE, "[SERVER]: "COL_WHITE"Server vas je prebacio u AFK mod radi duze neaktivnosti od 2 minute.");
            }
		}
	}
	
	if(IsPlayerConnected(playerid))
	{
		if(IsLogged[playerid] == true)
		{
			if(inactivetime[playerid] < 60000 && AFKstatus[playerid] == 1)
			{
				AFKstatus[playerid] = 0;

        		new sstring[124];
        		format(sstring, sizeof(sstring), "[SERVER]: "COL_GREY"%s [ID:%d] vise nije u AFK modu.", GetName(playerid), playerid);
        		SendMessageToStaff(COLOR_ADMINPURPLE, sstring);

	    		SendClientMessage(playerid, COLOR_ORANGE, "[SERVER]: "COL_WHITE"Vise niste u AFK modu.");
            }
		}
	}
this is on timer. ( 1 second ) on this timer is where server giving to player +1000 for no activity
Reply
#2

Where this code is placed
Reply
#3

This is placed here:
Код:
public Glob1SecPT1(playerid)
on OnGameModeInit i have timer

Код:
SetTimer("Glob1SecPT1", 1000, true)
Reply
#4

Do onplayerconnect
PHP код:
SetTimerEx("Glob1SecPT1"1000true"i"playerid); 
Reply
#5

Okay, thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)