//Sistema AFK By: MatheusSpohr
new bool:AFK[MAX_PLAYERS], TaAFK[300], NaoTaAFK[300], Nome[24], MotivoAFK[30];
CMD:afk(playerid, params[])
{
if(sscanf(params, "s[30]", MotivoAFK)) return SendClientMessage(playerid, Branco, "{FFFF00}[INFO]:{FF0000} Use: /AFK [Motivo]");
if(AFK[playerid] == true) return SendClientMessage(Branco, 128, "{FFFF00}[INFO]:{0000FF} Vocк Jб Estб AFK, Use: /SairAFK");
if(APlayerData[playerid][JobStarted] == true) return SendClientMessage(Branco, 128, "{FFFF00}[INFO]:{0000FF}Vocк Nгo Pode Utilizar Este Comando Enquanto Estiver Realizando Um Trabalho.");
AFK[playerid] = true;
TogglePlayerControllable(playerid, 0);
GetPlayerName(playerid, Nome, sizeof(Nome));
SendAdminText(playerid, "/Afk", params);
format(TaAFK, sizeof(TaAFK), "{FFFF00}[Sistema AFK]: {FF1493}O Jogador {FFFFFF}%s [ID:%d] {FF1493}Estб Ausente.(Razгo:%s)", Nome, playerid, MotivoAFK);
SendClientMessageToAll(Branco, TaAFK);
return 1;
}
CMD:sairafk(playerid, params[])
{
if(AFK[playerid] == false) return SendClientMessage(Branco, 128, "{FFFF00}[INFO]:{0000FF}Vocк Nгo Estб AFK!");
AFK[playerid] = false;
TogglePlayerControllable(playerid, 1);
GetPlayerName(playerid, Nome, sizeof(Nome));
SendAdminText(playerid, "/SairAfk", params);
format(NaoTaAFK, sizeof(NaoTaAFK), "{FFFF00}[Sistema AFK]: {FF1493}O Jogador {FFFFFF}%s [ID:%d] {FF1493}Voltou Ao Jogo.", Nome, playerid);
GameTextForPlayer(playerid, "~W~Voce Saiu Do Modo AFK!", 5000, 1);
SendClientMessageToAll(Branco, NaoTaAFK);
return 1;
}//Sistema AFK By: MatheusSpohr
if(AFK[playerid] == true) return SendClientMessage(Branco, 128, "{FFFF00}[INFO]:{0000FF} Vocк Jб Estб AFK, Use: /SairAFK");
if(AFK[playerid] == true) return SendClientMessage(playerid, Branco, "{FFFF00}[INFO]:{0000FF} Vocк Jб Estб AFK, Use: /SairAFK");
//Sistema AFK By: MatheusSpohr
new bool:AFK[MAX_PLAYERS], TaAFK[300], NaoTaAFK[300], Nome[24], MotivoAFK[30];
CMD:afk(playerid, params[])
{
SendAdminText(playerid, "/Afk", params);
if(AFK[playerid] == true) return SendClientMessage(Branco, 128, "{FFFF00}[INFO]:{0000FF} Vocк Jб Estб AFK, Use: /SairAFK");
if(APlayerData[playerid][JobStarted] == true) return SendClientMessage(Branco, 128, "{FFFF00}[INFO]:{0000FF}Vocк Nгo Pode Utilizar Este Comando Enquanto Estiver Realizando Um Trabalho.");
if(sscanf(params, "s[30]", MotivoAFK)) return SendClientMessage(playerid, Branco, "{FFFF00}[INFO]:{FF0000} Use: /AFK [Motivo]");
GetPlayerName(playerid, Nome, sizeof(Nome));
TogglePlayerControllable(playerid, 0);
AFK[playerid] = true;
format(TaAFK, sizeof(TaAFK), "{FFFF00}[Sistema AFK]: {FF1493}O Jogador {FFFFFF}%s [ID:%d] {FF1493}Estб Ausente.(Razгo:%s)", Nome, playerid, MotivoAFK);
SendClientMessageToAll(Branco, TaAFK);
return true;
}
CMD:sairafk(playerid, params[])
{
SendAdminText(playerid, "/SairAfk", params);
GetPlayerName(playerid, Nome, sizeof(Nome));
if(AFK[playerid] == false) return SendClientMessage(Branco, 128, "{FFFF00}[INFO]:{0000FF}Vocк Nгo Estб AFK!");
TogglePlayerControllable(playerid, 1);
AFK[playerid] = false;
format(NaoTaAFK, sizeof(NaoTaAFK), "{FFFF00}[Sistema AFK]: {FF1493}O Jogador {FFFFFF}%s [ID:%d] {FF1493}Voltou Ao Jogo.", Nome, playerid);
GameTextForPlayer(playerid, "~W~Voce Saiu Do Modo AFK!", 5000, 1);
SendClientMessageToAll(Branco, NaoTaAFK);
return true;
}//Sistema AFK By: MatheusSpohr
/* Sistema de Anti-AFK simples
Criador: Luan Argolo
*/
#include <a_samp>
#include <zcmd>
//Variбveis Globais
new bool:EntrouAFK[MAX_PLAYERS], Celulas[128];
stock GetarNome(playerid) {
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
return name;
}
CMD:afk(playerid) {
if(EntrouAFK[playerid] == false) {
format(Celulas, sizeof(Celulas), "O jogador %s entrou em AFK!", GetarNome(playerid));
SendClientMessageToAll(-1, Celulas);
GameTextForPlayer(playerid, "AFK!", 3000, 2);
EntrouAFK[playerid] = true;
TogglePlayerControllable(playerid, 0);
}
else {
format(Celulas, sizeof(Celulas), "O jogador %s nгo estб mais AFK", GetarNome(playerid));
SendClientMessageToAll(-1, Celulas);
EntrouAFK[playerid] = false;
TogglePlayerControllable(playerid, 1);
}
return 1;
}
CMD:jogadores_afk(playerid) {
for(new i = 0; i < MAX_PLAYERS; i++) {
if(EntrouAFK[i] == true) {
format(Celulas, sizeof(Celulas), "Jogador %s - [AFK]", GetarNome(i));
SendClientMessage(playerid, -1, Celulas);
}
}
return 1;
}
Mude essa linha:
PHP код:
PHP код:
|