[Ajuda] Tempo afk em cima do player - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Tempo afk em cima do player (
/showthread.php?tid=643665)
Tempo afk em cima do player -
MediaCL - 24.10.2017
Boa noite a todos
estou aqui para pedir ajuda a vocкs
pois estou fazendo um Sistema de AFK, e eu queria que quando o player digita-se /afk ou Ficasse de ESC
queria que aparece-se um
Quote:
SetPlayerChatBubble(playerid, "AFK A %S", COR_VAGOS, 100.0, 100000);
com
|
to tentando fazer
alguem tem uma ideia ??
queria que ficasse o tanto de tempo que o player ficou afk
Re: Tempo afk em cima do player -
Gguiz - 24.10.2017
Olhe suas mensagens privadas!
Re: Tempo afk em cima do player -
Rato22 - 24.10.2017
PHP код:
new bool:AFK[MAX_PLAYERS];
//OnPlayerConnect
AFK[playerid] = false;
//OnPlayerDisconnect
AFK[playerid] = false;
CMD:afk(playerid){
if(!AFK[playerid]){
SetPlayerChatBubble(playerid, "Ausente", 0xFFFFFFAA, 100.0, 100000);
return 1;
if(AFK[playerid]){
SetPlayerChatBubble(playerid, "Online", 0xFFFFFFAA, 100.0, 100000);
return 1;
}
return 1;
}
Re: Tempo afk em cima do player -
MediaCL - 24.10.2017
Rato22
eu queria tipo com uma Contagem de quanto tempo ele ficou de esc ou /afk
mas obrigado vou usar como base !!
Re: Tempo afk em cima do player -
VinnyScript - 24.10.2017
e so adaptar
Contagem
Код:
new timer, contagem = 15;
public OnPlayerCommandText(playerid,cmdtext)
{
if(!strcmp(cmdtext,"/contagem",true))
{
timer = SetTimer("Contagem",1000,true);
return true;
}
return false;
}
forward Contagem();
public Contagem()
{
contagem--;
if(contagem > 0)
{
for(new i = 0, j = GetMaxPlayers(); i != j; i++)
{
new string[30];
format(string,sizeof(string),"%i",contagem);
GameTextForPlayer(i, contagem,1000,0);
}
}
else
{
for(new i = 0, j = GetMaxPlayers(); i != j; i++)
{
GameTextForPlayer(i,"GO",3000,0);
KillTimer(timer);
}
}
return true;
}