[Pomoc] AFK

Započeo Sottra
30. Mar. 2015. Zaključano
267
pregleda
5
postova
osman2578
7
Underboss
30. Mar. 2015.
Evo ti ovako..
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;
}
Sottra
4
Shot Caller
30. Mar. 2015.
Jel sad kad stavim taj kod što si napiso jel mi treba onaj include što sam gore naveo jel ga mogu ukloniti?
osman2578
7
Underboss
30. Mar. 2015.
Ne treba ti Include,ovo sam ti otkucao i to ubaci u svoj gamemod.
Sottra
4
Shot Caller
31. Mar. 2015.
Hvala, možete lock.

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha