[Ajuda] Corrida n ta indo direito...
#1

To com dois problemas na minha corrida
1- Ela nгo acaba pra todos

Eu queria q qnd o cara chega-se em primeiro ele termina-se e a corrida sumisse pra todos os membros das orgs 18 e 22, pq qnd ele termina a corrida sу termina pra ele, mas os outros ainda correm
E pra ele desse 1000R$ e pros outros 200R$

Outra coisa a corrida sу й ativada por cmd n consigo botar pra ir automatica!

Codigo:
cmd era pra ativar pra todos, mas n ativa
pawn Код:
if(strcmp(cmd, "/corridam", true) == 0) {
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(PlayerInfo[playerid][pLider] == 18 || PlayerInfo[playerid][pMembro] == 18 || PlayerInfo[playerid][pLider] == 22 || PlayerInfo[playerid][pMembro] == 22)
        {
            if(Racer[playerid] == 0)
            {
                SetPlayerRaceCheckpoint(playerid, 0, 1963.6776,-1992.0397,12.9853, 2016.0938,-1754.4736,12.9797, 5.0);
                Racer[playerid] = 1;
                return 1;
            }
            if(Racer[playerid] >= 1)
            {
                SendClientMessage(playerid,COLOR_RED,"A corrida jб inicio!");
                return 1;
            }
         }
    }
}
Tentando por automatico, mas n vai
Ongamemodeinit
pawn Код:
SetTimer("SistemaInicioDaCorrida", 60000, true);
pawn Код:
stock SistemaInicioDaCorrida()
{
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(PlayerInfo[playerid][pLider] == 18 || PlayerInfo[playerid][pMembro] == 18 || PlayerInfo[playerid][pLider] == 22 || PlayerInfo[playerid][pMembro] == 22)
        {
            if(Racer[i] == 0)
            {
                SetPlayerRaceCheckpoint(i, 0, 1963.6776,-1992.0397,12.9853, 2016.0938,-1754.4736,12.9797, 5.0);
                Racer[i] = 1;
                return 1;
            }
            if(Racer[i] >= 1)
            {
                SendClientMessage(i,COLOR_RED,"A corrida jб inicio!");
                return 1;
            }
         }
    }
    return 1;
}
onplayerenterracecheckpoint
pawn Код:
switch(Racer[playerid])
    {
        case 1:
        {
            DisablePlayerRaceCheckpoint(playerid);
            PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
            SetPlayerRaceCheckpoint(playerid, 0, 2115.2515,-1483.3446,23.4033, 2071.8999,-1272.8511,23.4249, 5.0);
            Racer[playerid] = 2;
            return 1;
        }
        case 2:
        {
            DisablePlayerRaceCheckpoint(playerid);
            PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
            SetPlayerRaceCheckpoint(playerid, 0, 2178.1448,-1207.6063,23.4495, 2219.8486,-1134.5840,25.2176, 5.0);
            Racer[playerid] = 3;
            return 1;
        }
        case 3:
        {
            DisablePlayerRaceCheckpoint(playerid);
            PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
            SetPlayerRaceCheckpoint(playerid, 0, 2266.7405,-1205.5592,23.6917, 2337.9563,-1238.1149,22.0925, 5.0);
            Racer[playerid] = 4;
            return 1;
        }
        case 4:
        {
            DisablePlayerRaceCheckpoint(playerid);
            PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
            SetPlayerRaceCheckpoint(playerid, 0, 2369.0916,-1369.8298,23.4394, 2429.2222,-1569.2695,23.4284, 5.0);
            Racer[playerid] = 5;
            return 1;
        }
        case 5:
        {
            DisablePlayerRaceCheckpoint(playerid);
            PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
            SetPlayerRaceCheckpoint(playerid, 0, 2483.1487,-1668.2317,12.9371, 2543.6550,-1705.3014,12.9794, 5.0);
            Racer[playerid] = 6;
            return 1;
        }
        case 6:
        {
            DisablePlayerRaceCheckpoint(playerid);
            PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
            SetPlayerRaceCheckpoint(playerid, 0, 2623.9453,-1498.7509,15.8911, 2823.1658,-1420.2938,15.8422, 5.0);
            Racer[playerid] = 7;
            return 1;
        }
        case 7:
        {
            DisablePlayerRaceCheckpoint(playerid);
            PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
            SetPlayerRaceCheckpoint(playerid, 0, 2813.4746,-1566.9135,10.5208, 2608.4221,-1730.1307,11.7817, 5.0);
            Racer[playerid] = 8;
            return 1;
        }
        case 8:
        {
            DisablePlayerRaceCheckpoint(playerid);
            PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
            SetPlayerRaceCheckpoint(playerid, 0, 2106.6052,-1749.6509,13.0037, 2074.2664,-1340.7698,23.4126, 5.0);
            Racer[playerid] = 9;
            return 1;
        }
        case 9:
        {
            DisablePlayerRaceCheckpoint(playerid);
            PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
            SetPlayerRaceCheckpoint(playerid, 0, 1896.5535,-1359.7334,13.1059, 1963.5800,-1465.7476,12.9855, 5.0);
            Racer[playerid] = 10;
            return 1;
        }
        case 10:
        {
            DisablePlayerRaceCheckpoint(playerid);
            PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
            SetPlayerRaceCheckpoint(playerid, 0, 2038.3812,-1609.3011,12.9791, 2029.0157,-1749.2390,12.9803, 5.0);
            Racer[playerid] = 11;
            return 1;
        }
        case 11:
        {
            DisablePlayerRaceCheckpoint(playerid);
            PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
            SetPlayerRaceCheckpoint(playerid, 0, 2016.1378,-1784.4808,13.1425, 1959.2793,-1795.8865,12.9804, 5.0);
            Racer[playerid] = 12;
            return 1;
        }
        case 12:
        {
            DisablePlayerRaceCheckpoint(playerid);
            PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
            SetPlayerRaceCheckpoint(playerid, 0, 1957.9363,-1989.4994,12.9873, 1982.0854,-1990.5847,13.1439, 5.0);
            Racer[playerid] = 13;
            return 1;
        }
        /*case 12:
        {
            DisablePlayerRaceCheckpoint(playerid);
            PlayerPlaySound(playerid, 1056, 0.0, 0.0, 10.0);
            SetPlayerRaceCheckpoint(playerid, 0, 1957.9363,-1989.4994,12.9873, 1982.0854,-1990.5847,13.1439, 5.0);
            Racer[playerid] = 13;
            return 1;
        }*/

        case 13:
         {
                    static place;
                    place++;
                    DisablePlayerRaceCheckpoint(playerid);
                    PlayerPlaySound(playerid, 1056, 0.0, 0.0 , 10.0);
                    //SetPlayerRaceCheckpoint(playerid, 0, 1957.9363,-1989.4994,12.9873, 1982.0854,-1990.5847,13.1439, 5.0);
                    Racer[playerid] = 13; // Change this to your last checkpoint
                    new name[MAX_PLAYER_NAME], string[100];
                    GetPlayerName(playerid, name, sizeof(name));
                    format(string, sizeof(string), "Player %s Has Finshed Race [%d%s]", name, place, (place == 1) ? ("st") : (place == 2) ? ("nd") : (place == 3) ? ("rd") : ("th"));
                    SendClientMessageToAll(COLOR_WHITE, string);
                    GivePlayerMoney(playerid,1000);
                    DisablePlayerCheckpoint(playerid);
                    DisablePlayerRaceCheckpoint(playerid);
                    Racer[playerid] = 0;
                    for(new i = 0; i < MAX_PLAYERS; i++) {
                    DisablePlayerCheckpoint(playerid);
                    DisablePlayerRaceCheckpoint(playerid);
                    }
          }
    }
Reply
#2

Ou entao q desse pra ter primeiro segundo e terceiro sei lб com dinheiro diferente, mas ela tem q comeзar de 2 em 2 hrs e uma hora tem q terminar alguem me ajuda ai!
Reply
#3

alguem me ajuda ai namoral!!!!!
Reply
#4

heeeeeelp
Reply
#5

tem q ser algo tipo payday sу q de 2 em 2 hrs sу q o meu й de 1 em 1

pawn Код:
HoraPayDay(playerid);
public HoraPayDay(playerid)
{
    new string[64];
    new tmphour;
    new tmpminute;
    new tmpsecond;
    gettime(tmphour, tmpminute, tmpsecond);
    Fixhour(tmphour);
    tmphour = shifthour;
    if ((tmphour > ghour) || (tmphour == 0 && ghour == 23))
    {
        format(string, sizeof(string), "[IL]: Agora sгo exatamente %d:00 em Los Santos",shifthour);
        BroadCast(COLOR_GRAD1,string);
        ghour = tmphour;
        PayDay();
        SetHora();
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)