Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ////////////////////////////////////////////////////////////////////////////////
- // [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;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement