[TuT] Djurine Kućne Čarolije - Kako napraviti Race (GF)

Započeo zerocoolos, Avgust 29, 2009, 22:30:47 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 4 gostiju pregledaju ovu temu.

dobar tut svaka cast
Balkan Underground Ex. Head Administrator
Balkan Underground Ex. Elite Moderator


© Stefan_Misurovic, 2010. - 2014.


Citat: dock poslato Februar 13, 2012, 09:05:16 PRE PODNE
@ SoaD123 Mesas babe i zabe kod komande za prozivanje stavljas:


dragrace[giveplayerid] = 100;


a kod onplayerenterracecheckpoint trazis:


PlayerInfo[playerid][pUtrka]


Kako ocekujes da radi? :/

Stavi za proveru ili jedno ili drugo, ne mozes oba ... :)

A gle moje... :S
Ovo mi je Onplayerenterracecheckpoint
public OnPlayerEnterRaceCheckpoint(playerid)
{
            if(PlayerInfo[playerid][pUtrka] >= 2)
{
               if(PlayerToPoint(3.0, playerid,-2279.7034,-1726.2952,470.2519))//cp1
               {
                       if(PlayerInfo[playerid][pUtrka] == 2)
                       {
                            PlayerInfo[playerid][pUtrka] = 3;
                            SetPlayerRaceCheckpoint(playerid, 0, -2334.3279,-1816.5967,434.4522, -2444.0710,-1718.9965,431.9598, 3.0);// kao sto vidite u race cp unosite iduci cp i onaj iza njega
   }
               }
               if(PlayerToPoint(3.0, playerid,-2334.3279,-1816.5967,434.4522))//cp2
               {
                       if(PlayerInfo[playerid][pUtrka] == 3)
                       {
                            PlayerInfo[playerid][pUtrka] = 4;
                            SetPlayerRaceCheckpoint(playerid, 0, -2444.0710,-1718.9965,431.9598, -2440.2944,-1811.3301,410.2977, 3.0);
   }
               }
               if(PlayerToPoint(3.0, playerid,-2444.0710,-1718.9965,431.9598))//cp3
               {
                       if(PlayerInfo[playerid][pUtrka] == 4)
                       {
                            PlayerInfo[playerid][pUtrka] = 5;
                            SetPlayerRaceCheckpoint(playerid, 0, -2440.2944,-1811.3301,410.2977, -2520.4897,-1693.7389,401.9930, 3.0);
   }
               }
                              if(PlayerToPoint(3.0, playerid,-2440.2944,-1811.3301,410.2977))//cp4
               {
                       if(PlayerInfo[playerid][pUtrka] == 5)
                       {
                            PlayerInfo[playerid][pUtrka] = 6;
                            SetPlayerRaceCheckpoint(playerid, 0, -2520.4897,-1693.7389,401.9930, -2497.7583,-1561.1998,394.8573, 3.0);
   }
               }
                              if(PlayerToPoint(3.0, playerid,-2520.4897,-1693.7389,401.9930))//cp5
               {
                       if(PlayerInfo[playerid][pUtrka] == 6)
                       {
                            PlayerInfo[playerid][pUtrka] = 7;
                            SetPlayerRaceCheckpoint(playerid, 0, -2497.7583,-1561.1998,394.8573, -2475.4861,-1475.6108,390.3813, 3.0);
   }
               }
                              if(PlayerToPoint(3.0, playerid,-2497.7583,-1561.1998,394.8573))//cp6
               {
                       if(PlayerInfo[playerid][pUtrka] == 7)
                       {
                            PlayerInfo[playerid][pUtrka] = 8;
                            SetPlayerRaceCheckpoint(playerid, 0, -2475.4861,-1475.6108,390.3813, -2328.6982,-1452.1298,381.8164, 3.0);
   }
               }
               if(PlayerToPoint(3.0, playerid,-2475.4861,-1475.6108,390.3813))//cp n-ti
               {
                       if(PlayerInfo[playerid][pUtrka] == 0)
                       {
                            SendClientMessage(playerid, COLOR_YELLOW, "Prosao si kroz cilj");
PlayerInfo[playerid][pUtrka] = 0+1;//da mozete i dalje vidjeti kad prolaze kroz cilj
                            DisablePlayerRaceCheckpoint(playerid);
//-------------------[Ovo je da svi oni koji su na raceu vide kad prodjete kroz cilj]
                        new sendername[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        for(new i = 0; i < MAX_PLAYERS; i++)
                            {
           if(IsPlayerConnected(i))
           {
                                    if(PlayerInfo[i][pUtrka] > 0)
                {
                            new string[128];
format(string, sizeof(string), "Utrka - Cilj: %s",sendername);
                            SendClientMessage(i,COLOR_WHITE , string);
                }
           }
                             }

//-----------------------------------------------------------------------------
   }
               }
}
return 1;
}


a ovo mi je Dolje nastavljeno na kraju skripte ....

public UtrkaTimer()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
    if(PlayerInfo[i][pUtrka] == 1)
    {
              GameTextForPlayer(i, "2",1000,6);
              SetTimer("UtrkaTimer2",1000,0);
}
}
}
}
public UtrkaTimer2()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
    if(PlayerInfo[i][pUtrka] == 1)
    {
              GameTextForPlayer(i, "1",1000,6);
              SetTimer("UtrkaTimer3",1000,0);
}
}
}
}
public UtrkaTimer3()
{
    MoveObject(utrkakapija,-2307.099609375, -1661.2998046875, 480.29998779297, 5.0);//znaci kapija se automatski spusta kad timer kaze start
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
    if(PlayerInfo[i][pUtrka] == 1)
    {
              GameTextForPlayer(i, "START !!!",1000,6);
              SetPlayerRaceCheckpoint(i, 0, -2298.1472,-1675.3359,483.2267, -2279.7034,-1726.2952,470.2519, 3.0);//cp 1
              PlayerInfo[i][pUtrka] = 2;
}
}
}
}


komande rade, I odbrojava mi na sredini ekrana kad pokrenem utrku..... dvije svari mi se nedogode.... kada proÄ'em groz start CP onda start CP ne nestane te se nepojavi drugi

a druga stvar je nespusti mi se ograda.... hm...