[FilterScript] sistema afk v3.3 Com Alteraoзoes
#1

aki vou postar novamente o sistema afk v3.0 mas com alteraзoes
que quando p player da /afk mostra ensima da cabeзa
nome do player(id):esta afk
==================================================
Код:
//==============================================================================
//SISTEM AFK v3.0  CRIADO POR MAU_TITO
//VISITE MEU BLOG SUPORTE-TITO.BLOGSPOT.COM
//MSN PARA CONTATO:SUPORTE-TITO@HOTMAIL.COM
//==============================================================================
#include <a_samp>

new Celula[128], Nome[24], bool:AFK[MAX_PLAYERS];
new Text3D:Nome2[MAX_PLAYERS];
new Cores[] =
{
    0x5EB7E3AA,
    0xCD6CF6F6,
    0x685000F6
};

forward SendMensagens();
new Mensagens[2][256] =
{
    "Atenзao Comandos Afk: /afk /sairafk /listafk.",
    "Sistema Afk v3.0 Criado Por mau_tito."
};
public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("            Ligando...                  ");
    print("FS AFK Criado Por Mau Tito Ligado.");
    print("--------------------------------------\n");
    return true;
}

public OnFilterScriptExit()
{
    print("\n--------------------------------------");
    print("             Desligando...              ");
    print("FS AFK Criado Por Mau Tito.");
    print("--------------------------------------\n");
    return true;
}

main()
{
    print("\n----------------------------------");
    print("Criado Por Mau Tito.");
    print("FS AFK Criado Por Mau Tito.");
    print("----------------------------------\n");
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/afk", cmdtext, true) == 0)
    {
        for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, false);
        if(AFK[playerid] == true) return SendClientMessage(playerid, -1," Vocк Jб Estб AFK");
        AFK[playerid] = true;
        TogglePlayerControllable(playerid, 0);
        GetPlayerName(playerid, Nome, sizeof(Nome));
        format(Celula, sizeof(Celula), "{1E90FF}O Jogador {7FFFD4}%s {1E90FF}Esta Ausente.", Nome);
        GameTextForPlayer(playerid, "~Y~Voce Esta ~Y~em Modo~R~ Afk", 5000, 5);
        SendClientMessageToAll(-1, Celula);
        format(Celula, sizeof(Celula),"%s ID:%d Esta AFK.",Nome,playerid);
		Nome2[playerid] = Create3DTextLabel(Celula, 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
		Attach3DTextLabelToPlayer(Nome2[playerid], playerid, 0.0, 0.0, 0.7);

        return 1;
	}
	if (strcmp("/sairafk", cmdtext, true) == 0)
    {
        for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, true);
        if(AFK[playerid] == false) return SendClientMessage(playerid, -1," Vocк Jб Nгo Estб AFK.");
        AFK[playerid] = false;
        TogglePlayerControllable(playerid, 1);
        GetPlayerName(playerid, Nome, sizeof(Nome));
        format(Celula, sizeof(Celula), "{1E90FF}O Jogador {7FFFD4}%s {1E90FF}Voltou Ao Jogo.", Nome);
        GameTextForPlayer(playerid, "~Y~Voce Saiu ~Y~Do Modo~R~ Afk", 5000, 5);
        SendClientMessageToAll(-1, Celula);
        Delete3DTextLabel(Nome2[playerid]);
        return true;
    }

	if (strcmp("/playersafk", cmdtext, true) == 0)
    {
       SendClientMessage(playerid, 0xFF0000FF , "||======Players Afk======||");
       
       for(new i = 0; i < MAX_PLAYERS; i++)
       {
            if(IsPlayerConnected(i))
            {
                 if((AFK[i] == true))
                 {
                      GetPlayerName(i, Nome, sizeof(Nome));
                      GameTextForPlayer(playerid, "~R~|======Players Afk======|", 5000, 5);
                      format(Celula, 130, "%s", Nome);
                      SendClientMessage(playerid, -1, Celula);
                 }
            }
       }
       return true;
    }
    return false;
}
public SendMensagens()
{
    new string[265];
    new random1 = random(sizeof(Mensagens));
    new random2 = random(sizeof(Cores));
    format(string, sizeof(string), "%s", Mensagens[random1]);
    SendClientMessageToAll(Cores[random2],string);
    return 1;
}
//==============================================================================
//SISTEM AFK v3.0  CRIADO POR MAU_TITO
//VISITE MEU BLOG SUPORTE-TITO.BLOGSPOT.COM
//MSN PARA CONTATO:SUPORTE-TITO@HOTMAIL.COM
//==============================================================================
acesse me blog
suporte-tito.blogspot.com/
Reply
#2

Jб ouviu falar em edit?
Reply
#3

kkk nem ficaria melhor assim
Reply
#4

Nem de versгo mudou, entгo para que dois tуpicos da v3.0? Pra se alguem procurar no search se confundir com vбrias versхes?
Reply
#5

Magnus й ke eu ajudei ele por encima da cabesa do player %s ID: %d Esta AFK /sair afk tira acho ke deveria ter dado 1 edit mais tha bom .-.
Reply
#6

era so editar o outro topico
Reply
#7

Quote:
Originally Posted by [Magnus]
Посмотреть сообщение
Jб ouviu falar em edit?
І... mudou tanta coisa '-'
Reply
#8

і ... pelo menos da prуxima muda tudo pra v3.3 pra n confundir ninguйm '-'
Reply
#9

Porque usar "Mensagens[2][256]" se o maximo de caracteres no samp й 128.
Porque usar "string[256]" se o mбximo de caracteres no samp й 128.
Porque definiu "Celula[128]" sendo que string й a mesma coisa? para isso eliminava o string certo?
Porque nгo definiu o "string" global?
Porque nгo usou o ?
Aconselho vocк a ler este Topico
Reply
#10

Quote:
Originally Posted by mau_tito
Посмотреть сообщение
aki vou postar novamente o sistema afk v3.0 mas com alteraзoes
que quando p player da /afk mostra ensima da cabeзa
nome do player(id):esta afk
==================================================
Код:
//==============================================================================
//SISTEM AFK v3.0  CRIADO POR MAU_TITO
//VISITE MEU BLOG SUPORTE-TITO.BLOGSPOT.COM
//MSN PARA CONTATO:SUPORTE-TITO@HOTMAIL.COM
//==============================================================================
#include <a_samp>

new Celula[128], Nome[24], bool:AFK[MAX_PLAYERS];
new Text3D:Nome2[MAX_PLAYERS];
new Cores[] =
{
    0x5EB7E3AA,
    0xCD6CF6F6,
    0x685000F6
};

forward SendMensagens();
new Mensagens[2][256] =
{
    "Atenзao Comandos Afk: /afk /sairafk /listafk.",
    "Sistema Afk v3.0 Criado Por mau_tito."
};
public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("            Ligando...                  ");
    print("FS AFK Criado Por Mau Tito Ligado.");
    print("--------------------------------------\n");
    return true;
}

public OnFilterScriptExit()
{
    print("\n--------------------------------------");
    print("             Desligando...              ");
    print("FS AFK Criado Por Mau Tito.");
    print("--------------------------------------\n");
    return true;
}

main()
{
    print("\n----------------------------------");
    print("Criado Por Mau Tito.");
    print("FS AFK Criado Por Mau Tito.");
    print("----------------------------------\n");
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/afk", cmdtext, true) == 0)
    {
        for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, false);
        if(AFK[playerid] == true) return SendClientMessage(playerid, -1," Vocк Jб Estб AFK");
        AFK[playerid] = true;
        TogglePlayerControllable(playerid, 0);
        GetPlayerName(playerid, Nome, sizeof(Nome));
        format(Celula, sizeof(Celula), "{1E90FF}O Jogador {7FFFD4}%s {1E90FF}Esta Ausente.", Nome);
        GameTextForPlayer(playerid, "~Y~Voce Esta ~Y~em Modo~R~ Afk", 5000, 5);
        SendClientMessageToAll(-1, Celula);
        format(Celula, sizeof(Celula),"%s ID:%d Esta AFK.",Nome,playerid);
		Nome2[playerid] = Create3DTextLabel(Celula, 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
		Attach3DTextLabelToPlayer(Nome2[playerid], playerid, 0.0, 0.0, 0.7);

        return 1;
	}
	if (strcmp("/sairafk", cmdtext, true) == 0)
    {
        for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, true);
        if(AFK[playerid] == false) return SendClientMessage(playerid, -1," Vocк Jб Nгo Estб AFK.");
        AFK[playerid] = false;
        TogglePlayerControllable(playerid, 1);
        GetPlayerName(playerid, Nome, sizeof(Nome));
        format(Celula, sizeof(Celula), "{1E90FF}O Jogador {7FFFD4}%s {1E90FF}Voltou Ao Jogo.", Nome);
        GameTextForPlayer(playerid, "~Y~Voce Saiu ~Y~Do Modo~R~ Afk", 5000, 5);
        SendClientMessageToAll(-1, Celula);
        Delete3DTextLabel(Nome2[playerid]);
        return true;
    }

	if (strcmp("/playersafk", cmdtext, true) == 0)
    {
       SendClientMessage(playerid, 0xFF0000FF , "||======Players Afk======||");
       
       for(new i = 0; i < MAX_PLAYERS; i++)
       {
            if(IsPlayerConnected(i))
            {
                 if((AFK[i] == true))
                 {
                      GetPlayerName(i, Nome, sizeof(Nome));
                      GameTextForPlayer(playerid, "~R~|======Players Afk======|", 5000, 5);
                      format(Celula, 130, "%s", Nome);
                      SendClientMessage(playerid, -1, Celula);
                 }
            }
       }
       return true;
    }
    return false;
}
public SendMensagens()
{
    new string[265];
    new random1 = random(sizeof(Mensagens));
    new random2 = random(sizeof(Cores));
    format(string, sizeof(string), "%s", Mensagens[random1]);
    SendClientMessageToAll(Cores[random2],string);
    return 1;
}
//==============================================================================
//SISTEM AFK v3.0  CRIADO POR MAU_TITO
//VISITE MEU BLOG SUPORTE-TITO.BLOGSPOT.COM
//MSN PARA CONTATO:SUPORTE-TITO@HOTMAIL.COM
//==============================================================================
acesse me blog
suporte-tito.blogspot.com/
pqp, MANO EU TO COM MUITA RAIVA JБ DE VOCК, ta fazendo varios topicos, pra que criar outro com apenas uma simples atualizaзгo? ¬¬' acho que й so pra vocк botar nos seus projetos...................
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)