Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <zcmd>
- #define COR_B 0xFFFFFFFF
- #define FILTERSCRIPT
- #if defined FILTERSCRIPT
- #define DIALOGAFK 5000
- new Nome[MAX_PLAYER_NAME];
- new string[256];
- public OnFilterScriptInit()
- {
- print("Sistema AFK v0.2 Carregado");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("Sistema AFK v0.2 Descarregado");
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid, COR_B, "[FS]Sistema AFK v0.2 Criado Por .FuneraL.");
- return 1;
- }
- CMD:menuafk(playerid,params[])
- {
- ShowPlayerDialog(playerid,DIALOGAFK,DIALOG_STYLE_LIST,"Sistema AFK v0.2","Entrar Modo AFK\nSair Modo AFK","Fechar","");
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOGAFK)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- GetPlayerName(playerid, Nome, MAX_PLAYER_NAME)
- format(string, sizeof(string), "[AFK]: %s Entrou em Modo AFK! (/afk)", Nome);
- SendClientMessageToAll(COR_B, string);
- SetPlayerColor(playerid,0x008800FF);
- TogglePlayerControllable(playerid, 0);
- }
- case 1:
- {
- GetPlayerName(playerid, Nome, MAX_PLAYER_NAME)
- format(string, sizeof(string), "[AFK]: %s Voltou para o Servidor! (/sairafk)", Nome);
- SendClientMessageToAll(COR_B, string);
- SetPlayerColor(playerid,COR_B);
- TogglePlayerControllable(playerid, 1);
- }
- }
- }
- }
- return 1;
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement