[Pedido] Evento com tempo
#1

Galera como crio um evento por tempo, tipo eu chamo os players para um determinado lugar, lб eles nasce com uma determinada armas e talz.
Mas quando ele morre с voltar para seu lugar de spawn, ele volta ali mesmo no evento.
e sim quando o tempo do evento acabar todos voltam para seu lugar de spawn.
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=143251
https://sampforum.blast.hk/showthread.php?tid=121934
https://sampwiki.blast.hk/wiki/SetTimer
https://sampwiki.blast.hk/wiki/GivePlayerWeapon

agora estude procure quando eu aprendi pawn eu procurava |nao esperava na mao|
Reply
#3

evento eu ja tenho com arma e tudo, oq acontece й q quando crio evento с aparece para os outros players q eu estou chamando.
pawn Код:
new bool:PaintBall[MAX_PLAYERS];
new KillsPaintBall[MAX_PLAYERS];

public OnPlayerDeath(playerid, killerid, reason)
{
    new str[128], killername[MAX_PLAYER_NAME];
    KillsPaintBall[killerid] = 0;
    if(PaintBall[playerid] == true)
    {
        SetPlayerPos(playerid, 0, 0, 0); //Pos do PaintBall
        if(PaintBall[killerid] == true)
        {
            KillsPaintBall[killerid] ++;
            if(KillsPaintBall[killerid] >= 10)
            {
                GetPlayerName(killerid, killername, sizeof(killername));
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(PaintBall[i] == true)
                    {
                        format(str, sizeof(str), "%s й o Chuck Norris! Jб matou 10 no PaintBall sem morrer e o Evento acabou!");
                        SendClientMessage(i, -1, str);
                        PaintBall[playerid] = false;
                        SpawnPlayer(playerid);
                        KillsPaintBall[killerid] = 0;
                    }
                }
            }
        }
    }
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/chamarpaintball", cmdtext, true, 10) == 0)
    {
        new str[128], playername[MAX_PLAYER_NAME];
        if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Vocк nгo estб logado na RCON");
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                GetPlayerName(playerid, playername, sizeof(playername));
                format(str, sizeof(str), "%s estб convidando a todos para o Evento de PaintBall! Deseja aceitar?");
                ShowPlayerDialog(i, 7471, DIALOG_STYLE_MSGBOX, "Evento", str, "Sim", "Nгo");
            }
        }
        return 1;
    }
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 7471)
    {
        if(response)
        {
            PaintBall[playerid] = true;
            SetPlayerPos(playerid, 0, 0, 0); //Pos do PaintBall
            SendClientMessage(playerid, -1, "Bem Vindo ao PaintBall");
        }
        else
        {
            SendClientMessage(playerid, -1, "Vocк nгo foi para o Evento!");
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)