[Pomoc] Race

Započeo Moonwalker, Novembar 09, 2010, 18:39:38 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Ljudi, trebam malu pomoc.
Naime radio sam race prema tutu Djurine carolije - kako napraviti race, i dodavao, CP-ove, i krene utrka i sve, prvi cp pokaze, i kad dodjem na taj cp, nece uopce da dalje nastavi pokazivat cp-ove. nzm u cem je problem.

Evo code kako sam radio, pa ak netko zna...



public UtrkaTimer4()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
    if(PlayerInfo[i][pUtrka1] == 1)
    {
              GameTextForPlayer(i, "2",1000,6);
              SetTimer("UtrkaTimer5",1000,0);
}
}
}
}
public UtrkaTimer5()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
    if(PlayerInfo[i][pUtrka1] == 1)
    {
              GameTextForPlayer(i, "1",1000,6);
              SetTimer("UtrkaTimer6",1000,0);
}
}
}
}
public UtrkaTimer6()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
    if(PlayerInfo[i][pUtrka1] == 1)
    {
              GameTextForPlayer(i, "START !!!",1000,6);
              SetPlayerRaceCheckpoint(i, 0, -2279.8643,-1728.5593,470.1421, -2343.3291,-1816.8014,434.2834, 10);
              PlayerInfo[i][pUtrka1] = 2;
}
}
}
}


I evo nastavak dodavanja, cp-ova.....Ali nisam do kraja sve postavio, samo nekoliko da vidim oce to uopce raditi, i ispostavilo se da ne radi....


    if(PlayerInfo[playerid][pUtrka1] >= 2)
{
if(PlayerToPoint(5, playerid,-2279.8643,-1728.5593,470.1421))//cp1
{
if(PlayerInfo[playerid][pUtrka1] == 2)
{
PlayerInfo[playerid][pUtrka1] = 3;
                SetPlayerRaceCheckpoint(playerid, 0, -2343.3291,-1816.8014,434.2834, -2426.4685,-1738.7672,434.1338, 10);// kao sto vidite u race cp unosite iduci cp i onaj iza njega
}
        }
        if(PlayerToPoint(10, playerid,-2343.3291,-1816.8014,434.2834))//cp2
        {
        if(PlayerInfo[playerid][pUtrka1] == 3)
        {
PlayerInfo[playerid][pUtrka1] = 4;
                SetPlayerRaceCheckpoint(playerid, 0, -2426.4685,-1738.7672,434.1338, -2441.1936,-1785.4551,414.7432, 10);
}
}
}


Hvala unaprijed

POkusaj ovako.
public UtrkaTimer4()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
    if(PlayerInfo[i][pUtrka1] == 1)
    {
              GameTextForPlayer(i, "2",1000,6);
              SetTimer("UtrkaTimer5",1000,0);
}
}
}
}
public UtrkaTimer5()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
    if(PlayerInfo[i][pUtrka1] == 1)
    {
              GameTextForPlayer(i, "1",1000,6);
              SetTimer("UtrkaTimer6",1000,0);
}
}
}
}
public UtrkaTimer6()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
    if(PlayerInfo[i][pUtrka1] == 1)
    {
              GameTextForPlayer(i, "START !!!",1000,6);
              SetPlayerRaceCheckpoint(i, 0, -2279.8643,-1728.5593,470.1421, -2343.3291,-1816.8014,434.2834, 10);
              PlayerInfo[i][pUtrka1] = 1;
}
}
}
}


i cp.
if(PlayerInfo[playerid][pUtrka1] >= 0)
{
if(PlayerToPoint(5, playerid,-2279.8643,-1728.5593,470.1421))//cp1
{
if(PlayerInfo[playerid][pUtrka1] == 1)
{
PlayerInfo[playerid][pUtrka1] = 2;
                SetPlayerRaceCheckpoint(playerid, 0, -2343.3291,-1816.8014,434.2834, -2426.4685,-1738.7672,434.1338, 10);// kao sto vidite u race cp unosite iduci cp i onaj iza njega
}
        }
        if(PlayerToPoint(10, playerid,-2343.3291,-1816.8014,434.2834))//cp2
        {
        if(PlayerInfo[playerid][pUtrka1] == 2)
        {
PlayerInfo[playerid][pUtrka1] = 3;
                SetPlayerRaceCheckpoint(playerid, 0, -2426.4685,-1738.7672,434.1338, -2441.1936,-1785.4551,414.7432, 10);
}
}
}


kk. Tnx. Rjesio sam. Ali sada imam jos jedan problem.
Dodjem do predzadnjeg CP, i nece da mi pokaze FINISH CP. nzm zasto.

Evo kako sam napravio. Finish CP i jos 2 prije
if(PlayerToPoint(10, playerid,-2165.7915,-2044.5515,91.5598))//cp20
{
DisablePlayerRaceCheckpoint(playerid);
if(PlayerInfo[playerid][pUtrka1] == 20)
{
PlayerInfo[playerid][pUtrka1] = 21;
SetPlayerRaceCheckpoint(playerid, 0, -2312.8057,-2167.0205,40.7283, -2392.8501,-2204.2693,33.6387, 10);
}
}
if(PlayerToPoint(10, playerid,-2312.8057,-2167.0205,40.7283))//cp21
{
DisablePlayerRaceCheckpoint(playerid);
if(PlayerInfo[playerid][pUtrka1] == 21)
{
PlayerInfo[playerid][pUtrka1] = 22;
SetPlayerRaceCheckpoint(playerid, 1, -2392.8501,-2204.2693,33.6387, -2392.8501,-2204.2693,33.6387, 10);
}
}
if(PlayerToPoint(10, playerid,-2392.8501,-2204.2693,33.6387))//cp 22
{
if(PlayerInfo[playerid][pUtrka1] == 22)
{
SendClientMessage(playerid, COLOR_YELLOW, "Prosao si kroz cilj");
DisablePlayerRaceCheckpoint(playerid);
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pUtrka1] > 22)
{
format(string, sizeof(string), "Utrka - Cilj: %s",sendername);
SendClientMessage(i,COLOR_WHITE , string);
}
}
}
}
}


Molim vas pomozite.

Citat: Maurice poslato Novembar 09, 2010, 22:07:59 POSLE PODNE
kk. Tnx. Rjesio sam. Ali sada imam jos jedan problem.
Dodjem do predzadnjeg CP, i nece da mi pokaze FINISH CP. nzm zasto.

Evo kako sam napravio. Finish CP i jos 2 prije
if(PlayerToPoint(10, playerid,-2165.7915,-2044.5515,91.5598))//cp20
{
DisablePlayerRaceCheckpoint(playerid);
if(PlayerInfo[playerid][pUtrka1] == 20)
{
PlayerInfo[playerid][pUtrka1] = 21;
SetPlayerRaceCheckpoint(playerid, 0, -2312.8057,-2167.0205,40.7283, -2392.8501,-2204.2693,33.6387, 10);
}
}
if(PlayerToPoint(10, playerid,-2312.8057,-2167.0205,40.7283))//cp21
{
DisablePlayerRaceCheckpoint(playerid);
if(PlayerInfo[playerid][pUtrka1] == 21)
{
PlayerInfo[playerid][pUtrka1] = 22;
SetPlayerRaceCheckpoint(playerid, 1, -2392.8501,-2204.2693,33.6387, -2392.8501,-2204.2693,33.6387, 10);
}
}
if(PlayerToPoint(10, playerid,-2392.8501,-2204.2693,33.6387))//cp 22
{
if(PlayerInfo[playerid][pUtrka1] == 22)
{
SendClientMessage(playerid, COLOR_YELLOW, "Prosao si kroz cilj");
DisablePlayerRaceCheckpoint(playerid);
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pUtrka1] > 22)
{
format(string, sizeof(string), "Utrka - Cilj: %s",sendername);
SendClientMessage(i,COLOR_WHITE , string);
}
}
}
}
}


Molim vas pomozite.


To i mene zanima, imam isti takav problem. Ajd da se nadje netko pametan i da pomogne.
Hvala

Molim nekoga da nam pomogne jer imamo isti problem ja neznam vise sta moze biti sve sam probao...  :'(

Napravit cu vam ja sutra slican TUT pa sw strpite malo. :)

Citat: Ante_Dracar aka Lopa poslato Novembar 10, 2010, 20:11:12 POSLE PODNE
Napravit cu vam ja sutra slican TUT pa sw strpite malo. :)

pa zer ne bi mogo pogledat sta nevalja na ovom??

black_dota

aj nek neko uradi jos jedan taj tut jeste vi normalni 4 tuta za isto OMG

Ima Black_Dota pravo. hh. samo trazim da mi se pomogne, da netko pokusa pronac gdje sam pogrijesio, jer na ne vidim gresku. A ne da se pravi isti takvi tutovi.

moze meni tko dati tut samo kako da slozim checkpointe.. za oranje ili za nesto drugo