[Ajuda] Servidor
#1

Eu estou a criar um GameMode e ainda nгo tenho muita experiкncia mas o GameMode й fбcil de criar e como sabem tenho algumas dъvidas e claro que colocarei os crйditos de quem me ajudar no GameMode sу se for pedido o contrбrio й que nгo o faзo.

Minha dъvida:


Eu quero que quando apenas sobrar um player o GameMode reinicie para na public OnGameModeInit eu poder meter um tempo de AntiSpawnKill.

(Eu sei fazer o AntiSpawnKill sу nгo sei o resto)

@EDIT
Como eu coloco algo para verificar se o SetTimer ainda estб a decorrer no servidor e nгo no jogador. Obrigado.
Reply
#2

Como eu coloco algo para verificar se o SetTimer ainda estб a decorrer no servidor e nгo no jogador. Obrigado.
Reply
#3

Nгo entendi, expresse-se melhor.
Reply
#4

Tipo eu quero colocar para fazer alguma funзгo enquanto o timer estб a contar.

@EDIT

Nгo liguem a isto:

Код:
//Este GameMode й baseado num GameMode de Minecraft e nгo tem como principal objectivo o lucro
//Este GameMode foi criado por HugoCrown
//Este GameMode tem todos os direitos reservados

#include <a_samp>
#include <zcmd>
#include <F04>

new playerson;

COMMAND:kits(playerid, params[])
{
  ShowPlayerDialog(playerid, 0, DIALOG_STYLE_LIST, "Kits", "Sniper\nBombardeador\nAssassino Silencioso\nHomem de Fogo", "Escolher", "");
  return 1;
}



public OnGameModeInit()
{
    SetTimer("AK",5000,false);
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
        new name[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1];
        GetPlayerName(playerid, name, sizeof(name));
        format(string, sizeof(string), "%s morreu. 1 minuto de silкncio! Pense que o prуximo pode ser vocк!", name);
        SendClientMessageToAll(0xC4C4C4FF, string);
        SendClientMessage(playerid, 0xFF8000AA, "Vocк foi morto! Volte quando o jogo recomeзar.");
        Kick(playerid);
        return 1;
}


public OnPlayerConnect(playerid)
{

    if (playerson > 1)
    {
      Kick (playerid);
    }
    new string[64], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    format(string,sizeof string,"%s juntou-se ao servidor. Bem-vindo!",pName);
    SendClientMessageToAll(0xFFFFFFAA,string);
    playerson++;
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    new string[64], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,MAX_PLAYER_NAME);
    switch(reason)
    {
        case 0: format(string,sizeof string,"%s saiu do servidor por erro de conexгo ou crash.",name);
        case 1: format(string,sizeof string,"%s saiu do servidor por vontade prуpria.",name);
        case 2: format(string,sizeof string,"%s saiu do servidor porque foi kickado, banido ou morto.",name);
    }
    SendClientMessageToAll(0xFFFFFFAA,string);
    return 1;
}

public OnPlayerSpawn(playerid)
{
    SetPlayerHealth(playerid, 999999);
    SendClientMessage(playerid, -1, "O Anti Kill estб ativo. Espere o tempo acabar para comeзar a matar.");
}


forward AK();

public AK()
{
     SendClientMessageToAll(0xF47A00AA, "O Anti Kill acabou, jб pode comeзar a matanзa!");
     SetArmourAllPlayers(100);
     return 1;
}
Reply
#5

me manda o link de fazer topico
Reply
#6

Quote:
Originally Posted by Lendario
Посмотреть сообщение
me manda o link de fazer topico
Clica em New Thread na secзгo Portuguкs/Portuguese para pedir ajuda, apresentar futuros projectos, etc.
http://forum.sa-mp.com/newthread.php?do=newthread&f=34


Ou faзa o mesmo em Lanзamentos/Releases para apresentar seus mapas, FilterScripts ou Gamemodes.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)