Nabrzaka sam otkuco,ako bude kakva greskica i eror postavi ispod
#undef MAX_PLAYERS
#define MAX_PLAYERS 200 //K
#define COLOR_GREEN 0x33AA33AA
new afkTime;
forward oneSecond();
public oneSecond()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i))
{
//Label pocinje pokazivati kada igrac nije u igrici 30 sekundi
if(afkTime >= 30)
{
new caption;
format(caption, sizeof(caption), "AFK - %s seconds.", afkTime);
SetPlayerChatBubble(i, caption, COLOR_GREEN, 20.0, 1500);
}
afkTime++;
}
}
return 1;
}
public OnGameModeInit()
{
SetTimer("oneSecond", 1000, true);
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
afkTime = 0;
return 1;
}
public OnPlayerConnect(playerid)
{
afkTime = 0;
return 1;
}
