[FilterScript] Sistema AFK - 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)
+----- Forum: Lançamentos/Releases (
https://sampforum.blast.hk/forumdisplay.php?fid=56)
+----- Thread: [FilterScript] Sistema AFK (
/showthread.php?tid=444599)
Sistema AFK -
Rapha3L - 17.06.2013
Todos vocкs sabem para que serve isto. Ao fazer o
/afk o jogador fica automaticamente parado.
pawn Code:
////////////////////////////////////////////////////////////////////////////////
// [FS]Sistema AFK //
////////////////////////////////////////////////////////////////////////////////
// Autor: Rapha3L //
// Versгo: 1.0 //
// Ultima Modificaзгo: 17-06-2013 //
////////////////////////////////////////////////////////////////////////////////
// Crйditos: SA-MP Team/Wiki //
////////////////////////////////////////////////////////////////////////////////
//---[Includes]---//
#include <a_samp>
#include <zcmd>
//---[Defines]---//
#define TEXTO_UM 0xFFFF00AA
#define TEXTO_DOIS 0x33AA33AA
#define ID_Player 0x2E8B57AA
#define Nome_Player 0x3CB371AA
#define texto_normal 0x20B2AAAA
//---[Variбveis]---//
new AFK[MAX_PLAYERS];
//---[Comandos]---//
CMD:afk(playerid,params[])
{
new string[128];
format(string,sizeof(string),"{3CB371}%s{2E8B57}(%d) {20B2AA}Estб neste momento AFK.", PlayerName(playerid), playerid);
SendClientMessageToAll(TEXTO_UM, string);
SendClientMessage(playerid,TEXTO_DOIS,"Quando voltares faz o comando /voltar");
AFK[playerid] =1;
TogglePlayerControllable(playerid, 0);
return 1;
}
CMD:voltar(playerid,params[])
{
new string[128];
format(string,sizeof(string),"{3CB371}%s{2E8B57}(%d) {20B2AA}Estб novamente activo.", PlayerName(playerid), playerid);
SendClientMessageToAll(TEXTO_UM, string);
SendClientMessage(playerid,TEXTO_DOIS,"Faz o comando /afk se ficares longe do teclado.");
AFK[playerid] =0;
TogglePlayerControllable(playerid, 1);
return 1;
}
//---[%s e %d]---//
stock PlayerName(playerid)
{
new name[255];
GetPlayerName(playerid, name, 255);
return name;
}
Download: PasteBin
Re: Sistema AFK -
MonFiTy - 17.06.2013
Esse Fico + ou - Pois esse tem em quase todos GM e e facil de ser Crido mas fico bonzinho

7/10
Ja da pra estudar e fazer um mais avancado
Re: Sistema AFK -
-GooGle- - 17.06.2013
Cуdigo ъtil para mim,mas de qualquer jeito parabйns...podia fazer AFK automбtico,caso o player esteja parado muito tempo no mesmo local.
Re: Sistema AFK -
JapaN* - 17.06.2013
Cуdigo ъtil, mais um de tantos "sistemas de afk".
Re: Sistema AFK -
Gii - 17.06.2013
Dicas:
Redefina MAX_PLAYERS.
Vocк nгo esta usando parвmetros nos comandos entгo use somente:
Segundo a WIKI o limite mбximo de caracteres contidos em um nome й 24, entгo nгo hб necessidade de usar-se 255, como no caso.
Re: Sistema AFK -
clerISoN - 18.06.2013
Ficaria melhor se vocк colocasse uma if para quando o player estiver /afk ai quando ele desse /afk de novo nгo aparecer a mensagem novamente.
Re: Sistema AFK -
Prefacio - 18.06.2013
Codigo util pois tem varios mas Parabens
Re: Sistema AFK -
tonisantolia - 20.06.2013
( CODIGO ЪTIL )