[Pomoc] Opet nesto race

Započeo System32, Maj 19, 2011, 20:45:33 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: iStunt
Detaljan opis problema: Ma radim race, sa 2 CP-a i sve lijepo radi kad kucam /drag ali kad prodem odma kroz prvi race on mi zavrsi utrku, nesto sam mjesao tamo sa koordiantama ali nista
Dio skripte:
CMD:drag(playerid, params[])
{
    SetPlayerRaceCheckpoint(playerid, 0, 1332.9490,-1144.9395,23.6563, 912.3932,-1144.7374,23.8830, 10.0);
    Racer[playerid] = 1;
    return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{

    switch(Racer[playerid])
    {
    case 0:
        {
              DisablePlayerRaceCheckpoint(playerid);
              SetPlayerRaceCheckpoint(playerid, 0, 912.3932,-1144.7374,23.8830, 912.3932,-1144.7374,23.8830, 10.0);
              Racer[playerid] = 2;
              return 1;
         }
     case 1:
     {
        static place;
        place++;
        DisablePlayerRaceCheckpoint(playerid);
        SetPlayerRaceCheckpoint(playerid, 1, 1332.9490,-1144.9395,23.6563, 912.3932,-1144.7374,23.8830, 10.0);
        Racer[playerid] = 3;
        new name[MAX_PLAYER_NAME], string[100];
        GetPlayerName(playerid, name, sizeof(name));
        format(string, sizeof(string), "%s je zavrÅ¡io Drag utrku! [%d%s]", name, place, (place == 1) ? (".") : (place == 2) ? (".") : ("."));
        SendClientMessageToAll(COLOR_LIGHTBLUE, string);
        DisablePlayerCheckpoint(playerid);
      }
  }
    return 1;
}


Prvi CP:
1332.9490,-1144.9395,23.6563
Drugi CP:
912.3932,-1144.7374,23.8830
Neke slike/video za lakse dobivanje pomoci(neobavezno):
Uskoro novi stunt server iStunt. DoÄ'ite i zabavite se!




   
   




Dizajniram za $$$
Popis stvari koje radim:

Wallpaper √  Signature ×  Logo √  Dizajn stranice (Ne kodiranje) √  Baner √  Avatar √  Animacija √  Intro √

Pa nemoj stavit prvi CP,stavi kapiju i da je samo jedan CP,lakse je

Krive si caseove stavio. Stavi umjesto case 0: case 1:. I umjesto case 1: case 2:.

Last nick: Paradox

E edituj drugi kod ovako:



public OnPlayerEnterRaceCheckpoint(playerid) 

 
    switch(Racer[playerid]) 
    { 
    case 1: 
        { 
              DisablePlayerRaceCheckpoint(playerid); 
              SetPlayerRaceCheckpoint(playerid, 0, 912.3932,-1144.7374,23.8830, 912.3932,-1144.7374,23.8830, 10.0); 
              Racer[playerid] = 2; 
              return 1; 
         } 
     case 2: 
     { 
        static place; 
        place++; 
        DisablePlayerRaceCheckpoint(playerid); 
        SetPlayerRaceCheckpoint(playerid, 1, 1332.9490,-1144.9395,23.6563, 912.3932,-1144.7374,23.8830, 10.0); 
        Racer[playerid] = 3; 
        new name[MAX_PLAYER_NAME], string[100]; 
        GetPlayerName(playerid, name, sizeof(name)); 
        format(string, sizeof(string), "%s je zavrÅ¡io Drag utrku! [%d%s]", name, place, (place == 1) ? (".") : (place == 2) ? (".") : (".")); 
        SendClientMessageToAll(COLOR_LIGHTBLUE, string); 
        DisablePlayerCheckpoint(playerid); 
      } 
     } 
    return 1; 
}


I poravnaj to da ne bude lose indetation ;) i ne znam ali cini mi se da ti je falila . u " "

Probaj s "if(IsPlayerInCheckpoint(playerid))"
Znaci ovak:
public OnPlayerEnterRaceCheckpoint(playerid) 

 
    switch(Racer[playerid]) 
    { 
    case 0: 
        { 
              if(IsPlayerInCheckpoint(playerid))
             {
              DisablePlayerRaceCheckpoint(playerid); 
              SetPlayerRaceCheckpoint(playerid, 0, 912.3932,-1144.7374,23.8830, 912.3932,-1144.7374,23.8830, 10.0); 
              Racer[playerid] = 2; 
              return 1; 
         } 
       }
     case 1: 
     { 
     if(IsPlayerInCheckpoint(playerid))
       {
       static place; 
        place++; 
        DisablePlayerRaceCheckpoint(playerid); 
        SetPlayerRaceCheckpoint(playerid, 1, 1332.9490,-1144.9395,23.6563, 912.3932,-1144.7374,23.8830, 10.0); 
        Racer[playerid] = 3; 
        new name[MAX_PLAYER_NAME], string[100]; 
        GetPlayerName(playerid, name, sizeof(name)); 
        format(string, sizeof(string), "%s je zavrÅ¡io Drag utrku! [%d%s]", name, place, (place == 1) ? (".") : (place == 2) ? (".") : (".")); 
        SendClientMessageToAll(COLOR_LIGHTBLUE, string); 
        DisablePlayerCheckpoint(playerid); 
      } 
     } 
}
    return 1; 

hvala decki, Lane tvoje mi je pomoglo :D i morao sam maknut onaj zadnji CP :D hvala svima :D
Uskoro novi stunt server iStunt. DoÄ'ite i zabavite se!




   
   




Dizajniram za $$$
Popis stvari koje radim:

Wallpaper √  Signature ×  Logo √  Dizajn stranice (Ne kodiranje) √  Baner √  Avatar √  Animacija √  Intro √