[AJUDA] /desafio
#1

O Objetivo do comando й que quando um player desse /desafio apareзesse uma mensagem pra membros das orgs de corrida pra irem ao estacionamento , e quando chegassem lб , esses membros dariam /participar , e ai depois de tipo 3 minutos a corrida comeзaria e iria atй um dos pontos determinados por mim .

Dъvida de como adicionar os pontos e faze-los serem sorteados , e como fazer o comando pegar .

Eu tentei fazer aqui algo mas nгo deu muito certo

pawn Code:
// Inicio GM
new donoestacionamento;
new GZCorredores;
new DESAFIO[MAX_PLAYERS];
new PARTICIPANDOCORRIDA[MAX_PLAYERS];
new TempoIniciarCorrida;
forward Corrida(playerid);

//OnGamemodeinit

GZCorredores = GangZoneCreate(2648.871582, -1867.313110, 2824.871582, -1675.313110);
donoestacionamento = 0;


//OnPlayerConnect

if(donoestacionamento == 0)
{
GangZoneShowForPlayer(playerid, GZCorredores, 0xC0C0C0AA);
}
if(donoestacionamento == 1)
{
GangZoneShowForPlayer(playerid, GZCorredores, -16777017);
}
if(donoestacionamento == 2)
{
GangZoneShowForPlayer(playerid, GZCorredores, -8388424);
}
// OnPlayerCommandText

if(strcmp(cmd, "/desafio", true) == 0)
{
if(PlayerToPoint(5.0 , playerid , 2740.2791,-1862.6315,9.2958))
    {
        if(PlayerInfo[playerid][pRank] >= 4 || PlayerInfo[playerid][pLeader] == 10 || PlayerInfo[playerid][pLeader] == 16)
        {
        GetPlayerName(playerid, sendername, sizeof(sendername));
        DESAFIO[playerid] = 1;
        format(string, sizeof(string), "%s lanзou um desafio.",sendername);
        Mensagemcorredores(COLOR_LIGHTBLUE,string);
        }
                    }
    return 0;
    }
if(strcmp(cmd,"/participar",true) == 0)
{
if(PlayerInfo[playerid][pRank] >= 4 || PlayerInfo[playerid][pLeader] == 10 || PlayerInfo[playerid][pLeader] == 16)
{
if(PlayerToPoint(5.0 , playerid , 2740.2791,-1862.6315,9.2958))
{
if(DESAFIO[playerid] == 1)
{
PARTICIPANDOCORRIDA[playerid] = 1;
TempoIniciarCorrida = SetTimerEx("Corrida", 300000, 0 , "i", playerid);
SendClientMessage(playerid, COLOR_WHITE , "Vocк irб participar da corrida aguarde atй comeзar");
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Nenhum desafio foi lanзado");
}
return 1;
}

public Corrida(playerid)
{
SetPlayerCheckpoint(playerid,-1027.4022,-672.5286,31.6657 , 5 );
SendClientMessage(playerid,COLOR_YELLOW, " A Corrida comeзou vб atй o ponto vermelho para ganhar !" );
}
if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
{
 if(PARTICIPANDOCORRIDA[playerid] == 1)
{
 if(IsPlayerInCorrida1(playerid))
 {
   new string[56];
      format(string, sizeof(string), "[TERRITУRIO]%s e os fast and furious dominaram o estacionamento.");
      SendClientMessageToAll(COLOR_YELLOW, string);
      GangZoneShowForPlayer(playerid, GZCorredores, -16777017);
      donoestacionamento = 1;
      DisablePlayerCheckPoint(playerid);
      DESAFIO[playerid] = 0;
      PARTICIPANDOCORRIDA[playerid] = 0;
      KillTimer(Corrida);
}
}
}
if(PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)
{
 if(PARTICIPANDOCORRIDA[playerid] == 1)
{
 if(IsPlayerInCorrida1(playerid))
 {
   new string[56];
      format(string, sizeof(string), "[TERRITУRIO]%s e os asphalt kings dominaram o estacionamento.");
      SendClientMessageToAll(COLOR_YELLOW, string);
      GangZoneShowForPlayer(playerid, GZCorredores, -8388424);
      donoestacionamento = 2;
      DisablePlayerCheckPoint(playerid);
      DESAFIO[playerid] = 0;
      PARTICIPANDOCORRIDA[playerid] = 0;
      KillTimer(Corrida);
}
}




//Fim do gm

stock IsPlayerInCorrida1(playerid)
{
if(PlayerToPoint(3.0 , -1027.4022,-672.5286,31.6657); return 1;
else return 0;
}
Reply


Messages In This Thread
[AJUDA] /desafio - by Nightwish - 15.04.2011, 21:05
Re: [AJUDA] /desafio - by Macintosh - 15.04.2011, 21:18
Re: [AJUDA] /desafio - by Diogo_Bras - 15.04.2011, 21:27
Re: [AJUDA] /desafio - by Carl_Thuse - 15.04.2011, 21:27
Re: [AJUDA] /desafio - by Nightwish - 15.04.2011, 21:39
Re: [AJUDA] /desafio - by Diogo_Bras - 15.04.2011, 21:52
Re: [AJUDA] /desafio - by Nightwish - 15.04.2011, 22:24
Re: [AJUDA] /desafio - by Carl_Thuse - 16.04.2011, 11:27
Re: [AJUDA] /desafio - by Nightwish - 16.04.2011, 13:42
Re: [AJUDA] /desafio - by JonathanFeitosa - 16.04.2011, 14:11

Forum Jump:


Users browsing this thread: 1 Guest(s)