Pessoal eu pesquisei e с achei !
#1

Olб Pessoal, eu pesquisei um codigo na net codigo de /contar pra por no GM se vocкs tiverem por favor ajude-me

Por Favor "NAO FS " estou diinuimndo nivel de fs !!!! obrigado

Grato: Gustavo

pawn Code:
//FORWARDS:
pawn Код:
[quote]

forward CountDown();
forward StartCount(p);


//news:

new Count;
new bool: IsCountdownStarted;
new CountdownTimer;
forward CountDown();


//OnPlayerCommandText:

if(strcmp(cmdtext,"/contar",true)==0)
    {
        if(IsCountdownStarted == false)
        {
        new pName[MAX_PLAYER_NAME];
            Count = 5;
            CountdownTimer = SetTimer("CountDown", 1000, 1);
            IsCountdownStarted = true;
            SendClientMessage(playerid, 0x00FF00FF, "Vocк comeзou uma contagem");
            new countstring[256];
            GetPlayerName(playerid,pName, MAX_PLAYER_NAME);
            format(countstring, sizeof(countstring), "%s comeзou uma contagem", pName);
            SendClientMessageToAll(COLOR_WHITE, countstring);
        }
        else
        {
            SendClientMessage(playerid, COLOR_WHITE, "Jб hб uma contagem em andamento");
        }
        return 1;
    }


//Final do gm:

    public CountDown()
{
    switch(Count)
    {
        case 5: { GameTextForAll("~n~~b~-~r~ 5 ~w~-", 1100, 3); }
        case 4: { GameTextForAll("~n~~b~-~r~ 4 ~w~-", 1100, 3); }
        case 3: { GameTextForAll("~n~~b~-~r~ 3 ~w~-", 1100, 3); }
        case 2: { GameTextForAll("~n~~b~-~r~ 2 ~w~-", 1100, 3); }
        case 1: { GameTextForAll("~n~~b~-~r~ 1 ~w~-", 1100, 3); }
        case 0:
        {
            GameTextForAll("~w~Go~b~ Drifter~w~ Go!!", 2000, 3);
            KillTimer(CountdownTimer);
            IsCountdownStarted = false;
        }
    }
    Count--;
}[/quote]








Obrigado CrazZy N deu erro nenhum so falto uns ";" mas de boa arrumei !!!!
Reply
#2

pawn Код:
forward GameUm(allplayers);
public GameUm(allplayers)
{
    GameTextForAll("~b~3", 4000, 3);
    SetTimer("GameDois", 1500, false);
    return 1;
}

forward GameDois(allplayers);
public GameDois(allplayers)
{
    GameTextForAll("~g~2", 4000, 3);
    SetTimer("GameTres", 1500, false);
    return 1;
}

forward GameTres(allplayers);
public GameTres(allplayers)
{
    GameTextForAll("~r~1", 4000, 3);
    SetTimer("GameRounde", 1500, false);
    return 1;
}
forward GameRounde(allplayers);
public GameRounde(allplayers)
{
    GameTextForAll("~g~Roundi Uam!", 4000, 3);
    SetTimer("GameGo", 1500, false);
    return 1;
}

forward GameGo(allplayers);
public GameGo(allplayers)
{
    GameTextForAll("~p~Faiti", 4000, 3);
    return 1;
}
Usa a public GameUm para iniciar a contagem.
Reply
#3

pawn Код:
CMD:contar(playerid,params[])
{
GameTextForAll(5, 1000, 4);
GameTextForAll(4, 1000, 4);
GameTextForAll(3, 1000, 4);
GameTextForAll(2, 1000, 4);
GameTextForAll(1, 1000, 4);
GameTextForAll(Go!, 1000, 4);
return 1;
}
?
@Edit: Testa ai,mais pensando bem,acho que isso bugaria.
Reply
#4

Quote:
Originally Posted by Gustavo_Araujo
Посмотреть сообщение
pawn Код:
CMD:contar(playerid,params[])
{
GameTextForAll(5, 1000, 4);
GameTextForAll(4, 1000, 4);
GameTextForAll(3, 1000, 4);
GameTextForAll(2, 1000, 4);
GameTextForAll(1, 1000, 4);
GameTextForAll(Go!, 1000, 4);
return 1;
}
?
@Edit: Testa ai,mais pensando bem,acho que isso bugaria.
Nгo sу bugaria como crasharia. As parada nгo ta entre "5", "4"...
Vamos parar de flood amigo? ._.
Reply
#5

Magnus cade o /contar .-.
Reply
#6

usa zcmd? se sim usa:
pawn Код:
CMD:contar(playerid,params[])
{
GameUm(allplayers);
return 1;
}
caso use strcmp:
pawn Код:
if(strcmp("/contar", cmdtext, true, 7) == 0)
{
GameUm(allplayers);
return 1;
}
Reply
#7

traduзao :S tendi й nada
Reply
#8

voce deve usar strcmp,entao adiciona isso em OnPlayerCommandText:
pawn Код:
if(strcmp("/contar", cmdtext, true, 7) == 0)
{
GameUm(allplayers);
return 1;
}
Reply
#9

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/contar", cmdtext, true, 10) == 0)
{
    GameTextForAll("~n~ ~n~ ~n~ ~w~Uma contagem foi iniciada!", 4000, 3);
    SetTimer("GameUm", 1500, false);
    SendClientMessage(playerid, -1, "Vocк comeзou uma contagem.");
    return 1;
}
return 1;
Final do GM:
pawn Код:
forward GameUm(allplayers);
public GameUm(allplayers)
{
    GameTextForAll("~b~3", 4000, 3);
    SetTimer("GameDois", 1500, false);
    return 1;
}

forward GameDois(allplayers);
public GameDois(allplayers)
{
    GameTextForAll("~g~2", 4000, 3);
    SetTimer("GameTres", 1500, false);
    return 1;
}

forward GameTres(allplayers);
public GameTres(allplayers)
{
    GameTextForAll("~r~1", 4000, 3);
    SetTimer("GameRounde", 1500, false);
    return 1;
}
forward GameRounde(allplayers);
public GameRounde(allplayers)
{
    GameTextForAll("~g~Roundi Uam!", 4000, 3);
    SetTimer("GameGo", 1500, false);
    return 1;
}

forward GameGo(allplayers);
public GameGo(allplayers)
{
    GameTextForAll("~p~Faiti", 4000, 3);
    return 1;
}
Reply
#10

Magnus:


C:\Users\Gustavo\Desktop\SAMP 0.3 Server\gamemodes\DsR.pwn(3016) : error 017: undefined symbol "allplayers"
C:\Users\Gustavo\Desktop\SAMP 0.3 Server\gamemodes\DsR.pwn(3023) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)