[Ajuda] /Count em chat
#1

Olб galera, hoje estarei pedindo uma ajuda para vocкs... й num novo trabalho meu em um gm.. Gostaria de pedir que me ajudassem a criar um /count em chat! agora estou me encentivando mais nos script's, poderiam me ajudar?
Reply
#2

/count

Aguarde:


5


4


3


2


1


fiz ta ae? troolll mode on!!!

#topic, e desse geito que fiz acima que tu quer tipo :

Aguarde a Contagem...

5

4

3

2

1

GOGO!!!!
Reply
#3

Quote:

/count

Aguarde:


5


4


3


2


1


fiz ta ae? troolll mode on!!!

#topic, e desse geito que fiz acima que tu quer tipo :

Aguarde a Contagem...

5

4

3

2

1

GOGO!!!!

Po cara desse jeito mermo.
Reply
#4

Posso pidir uma coisa se tu quiser? um respawn de cars?
Reply
#5

Quote:
Originally Posted by Gustavo_Samp
Посмотреть сообщение
Posso pidir uma coisa se tu quiser? um respawn de cars?
respawn de carros?

tipo digito /veiculo

ai aparece um dialog:

Veiculos entre 400 bla bla bla 611 bla bla

ai digita um id de carro voce aparece dentro dele?

#Edit:

enquanto a contagem clique aqui
mude apenas a gametext por sendclient message
Reply
#6

cara, se eu deixo normal nem da erro, mas eu ponho send.. oia q da: C:\Users\Gustavo\Desktop\Server 0.3a r8\gamemodes\KT.pwn(1707) : error 035: argument type mismatch (argument 2)
C:\Users\Gustavo\Desktop\Server 0.3a r8\gamemodes\KT.pwn(170 : error 035: argument type mismatch (argument 2)
C:\Users\Gustavo\Desktop\Server 0.3a r8\gamemodes\KT.pwn(1709) : error 035: argument type mismatch (argument 2)
C:\Users\Gustavo\Desktop\Server 0.3a r8\gamemodes\KT.pwn(1710) : error 035: argument type mismatch (argument 2)
C:\Users\Gustavo\Desktop\Server 0.3a r8\gamemodes\KT.pwn(1711) : error 035: argument type mismatch (argument 2)
C:\Users\Gustavo\Desktop\Server 0.3a r8\gamemodes\KT.pwn(1712) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Reply
#7

Quote:
Originally Posted by Gustavo_Samp
Посмотреть сообщение
cara, se eu deixo normal nem da erro, mas eu ponho send.. oia q da: C:\Users\Gustavo\Desktop\Server 0.3a r8\gamemodes\KT.pwn(1707) : error 035: argument type mismatch (argument 2)
C:\Users\Gustavo\Desktop\Server 0.3a r8\gamemodes\KT.pwn(170 : error 035: argument type mismatch (argument 2)
C:\Users\Gustavo\Desktop\Server 0.3a r8\gamemodes\KT.pwn(1709) : error 035: argument type mismatch (argument 2)
C:\Users\Gustavo\Desktop\Server 0.3a r8\gamemodes\KT.pwn(1710) : error 035: argument type mismatch (argument 2)
C:\Users\Gustavo\Desktop\Server 0.3a r8\gamemodes\KT.pwn(1711) : error 035: argument type mismatch (argument 2)
C:\Users\Gustavo\Desktop\Server 0.3a r8\gamemodes\KT.pwn(1712) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Vocк nгo mudou de GameText para SendClientMessage. Se vocк mudou, esqueceu de "adaptar" os parвmetros.
Reply
#8

Quote:

Vocк nгo mudou de GameText para SendClientMessage. Se vocк mudou, esqueceu de "adaptar" os parвmetros.

pawn Код:
public Contagem(playerid)
{
KillTimerC = SetTimerEx("Contagem",1000,false,"i",playerid); //Farб com que ele chame essa callback a cada 1 segundo, OBS.: nunca ponha true em lugar de false, pois irб causar lags e atй crash de seu servidor
Count[playerid]--; //Quando a callback й chamada a cada 1 segundo ele irб diminuir 1 valor da vбriavel Count
for(new i; i < MAX_PLAYERS; i++) //Isso й um Loop para todos os jogadores...
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z); //Pega as coordenadas do jogador
if(IsPlayerInRangeOfPoint(i,150.0,X,Y,Z)) //...porйm isso limita somente aos jogadores prуximos a vocк em um raio de 150m
{
TogglePlayerControllable(i,false); //Se tiver jogadores prуximo a vocк, todos serгo congelados, inclusive vocк
if(Count[playerid] == 1) SendClientMessage(i,"~g~VAI!",1000,5),KillTimer(KillTimerC),Count[playerid] = 0, TogglePlayerControllable(i,true); //Quando a vбriavel chegar a 1 ela irб parar de chamar a callback e zerar a vбriavel Count para zero, fazendo assim com que vocк possa reutilizar o comando /contar
if(Count[playerid] == 2) SendClientMessage(i,"~g~1",1000,5);
if(Count[playerid] == 3) SendClientMessage(i,"~y~2",1000,5);
if(Count[playerid] == 4) SendClientMessage(i,"~y~3",1000,5);
if(Count[playerid] == 5) SendClientMessage(i,"~r~4",1000,5);
if(Count[playerid] == 6) SendClientMessage(i,"~r~5",1000,5);
}
}
return 1;
}
Se tiver algo errado me ajude pf,..
Reply
#9

Eu fiz esse aqui, me corrijam se tiver algo errado, nгo testei, mas compilei, estб sem erros.
pawn Код:
forward Contar();
new bool:Contando,
    TimerContar,
    Countdown;
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/contar", cmdtext, true, 10) == 0)
    {
        if(!Contando)
        {
            new iStr[60];
            static pName[24];
            GetPlayerName(playerid, pName, 24);
            format(iStr, sizeof(iStr),"INFO: %s comeзou uma contagem!", pName);
            SendClientMessageToAll(0x008000AA, iStr);
            TimerContar = SetTimer("Contar", 1000, 1);
            Contando = true;
        }
        if(Contando)
        {
            SendClientMessage(playerid, -1, "INFO: Erro! Uma contagem jб estб sendo feita.");
        }
        return 1;
    }
    return 0;
}

public Contar()
{
    switch(Countdown)
    {
        case 1:
        {
            Countdown ++;
            SendClientMessageToAll(0x008000AA, "Contagem: 5");
        }
        case 2:
        {
            Countdown ++;
            SendClientMessageToAll(0x008000AA, "Contagem: 4");
        }
        case 3:
        {
            Countdown ++;
            SendClientMessageToAll(0x008000AA, "Contagem: 3");
        }
        case 4:
        {
            Countdown ++;
            SendClientMessageToAll(0x008000AA, "Contagem: 2");
        }
        case 5:
        {
            Countdown ++;
            SendClientMessageToAll(0x008000AA, "Contagem: 1");
        }
        case 6:
        {
            Countdown = 1;
            //Killar();
            KillTimer(TimerContar);
            SendClientMessageToAll(0x008000AA, "Contagem: Go Go Go");
            Contando = false;
        }
    }
    return 1;
}
Reply
#10

Quote:
Originally Posted by dMagnus
Посмотреть сообщение
Eu fiz esse aqui, me corrijam se tiver algo errado, nгo testei, mas compilei, estб sem erros.
pawn Код:
forward Contar();
new bool:Contando,
    TimerContar,
    Countdown;
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/contar", cmdtext, true, 10) == 0)
    {
        if(!Contando)
        {
            new iStr[60];
            static pName[24];
            GetPlayerName(playerid, pName, 24);
            format(iStr, sizeof(iStr),"INFO: %s comeзou uma contagem!", pName);
            SendClientMessageToAll(0x008000AA, iStr);
            TimerContar = SetTimer("Contar", 1000, 1);
            Contando = true;
        }
        if(Contando)
        {
            SendClientMessage(playerid, -1, "INFO: Erro! Uma contagem jб estб sendo feita.");
        }
        return 1;
    }
    return 0;
}

public Contar()
{
    switch(Countdown)
    {
        case 1:
        {
            Countdown ++;
            SendClientMessageToAll(0x008000AA, "Contagem: 5");
        }
        case 2:
        {
            Countdown ++;
            SendClientMessageToAll(0x008000AA, "Contagem: 4");
        }
        case 3:
        {
            Countdown ++;
            SendClientMessageToAll(0x008000AA, "Contagem: 3");
        }
        case 4:
        {
            Countdown ++;
            SendClientMessageToAll(0x008000AA, "Contagem: 2");
        }
        case 5:
        {
            Countdown ++;
            SendClientMessageToAll(0x008000AA, "Contagem: 1");
        }
        case 6:
        {
            Countdown = 1;
            //Killar();
            KillTimer(TimerContar);
            SendClientMessageToAll(0x008000AA, "Contagem: Go Go Go");
            Contando = false;
        }
    }
    return 1;
}
Sim, estб errado. Alйm de estar errado, vocк usou linhas em vгo.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)