[Pomoc]CP-ovi

Započeo Brabus, Septembar 20, 2010, 23:45:38 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

//-----------------------------------[RALLY]--------------------------------------------------------
if (strcmp(cmd, "/rally", true)==0)
    {
        if(PlayerInfo[playerid][pAdmin] >= 2)
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "KORISTITE: /rally[playerid/PartOfName]");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            if (PlayerInfo[playerid][pAdmin] >= 2)
            {
                if(IsPlayerConnected(giveplayerid))
                {
                    SetPlayerCheckpoint(giveplayerid, 1521.8499,-179.7902,13.3110,50.0);
                    CP[giveplayerid] = 300;
                    GetPlayerName(playerid, sendername, sizeof(sendername));
                    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                    format(string, sizeof(string), "ORGANIZATOR %s je pozvao %s na rally event!", sendername, giveplayer);
                    SendClientMessageToAll(COLOR_LIGHTRED, string);
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD2, " Niste autorizirani za koristenje ove naredbe !");
            }
        }
        return 1;
    }
   


public OnPlayerEnterCheckpoint(playerid)
{
    new string[128];
    new name[MAX_PLAYER_NAME];
    if(TaxiCallTime[playerid] > 0 && TaxiAccepted[playerid] < 999)
    {
        TaxiAccepted[playerid] = 999;
        GameTextForPlayer(playerid, "~w~Reached destination", 5000, 1);
        TaxiCallTime[playerid] = 0;
        DisablePlayerCheckpoint(playerid);
    }
    else if(BusCallTime[playerid] > 0 && BusAccepted[playerid] < 999)
    {
        BusAccepted[playerid] = 999;
        GameTextForPlayer(playerid, "~w~Reached destination", 5000, 1);
        BusCallTime[playerid] = 0;
        DisablePlayerCheckpoint(playerid);
    }
     else if(CP[playerid] == 300) { CP[playerid] = 301; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1521.8499,-179.7902,13.3110,10.0); } //1
    else if(CP[playerid] == 302) { CP[playerid] = 303; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1286.2234,-170.0846,30.3568,10.0); } //2
    else if(CP[playerid] == 304) { CP[playerid] = 305; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1200.4286,-90.7484,38.7524,10.0); } //3
    else if(CP[playerid] == 306) { CP[playerid] = 307; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 962.7036,-87.2479,18.9034,10.0); } //4
    else if(CP[playerid] == 308) { CP[playerid] = 309; DisablePlayerCheckpo

I ovi CP-ovi idu dalje..Nisam stavio sve

A problem je u tome kad prodem korz prvi CP da mi nece prikazati 2 :S Pomoc

cek kakve veze ima gornji kod "rally" sa donjim "taxi" i "bus" ?? daj lijepo kodove...

U gornjem "rally"
imas ovo
SetPlayerCheckpoint(giveplayerid, 1521.8499,-179.7902,13.3110,50.0);
                   CP[giveplayerid] = 302;



else if(CP[playerid] == 302) { CP[playerid] = 303; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1286.2234,-170.0846,30.3568,10.0); } //2
   else if(CP[playerid] == 304) { CP[playerid] = 305; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1200.4286,-90.7484,38.7524,10.0); } //3
   else if(CP[playerid] == 306) { CP[playerid] = 307; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 962.7036,-87.2479,18.9034,10.0); } //4


I ovako kroz "1521.8499,-179.7902,13.3110" prodem, i on nestane, a kroz ove ostale nemogu kroz ovaj:

else if(CP[playerid] == 302) { CP[playerid] = 303; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1286.2234,-170.0846,30.3568,10.0); } //2

Prikaze mi se ali nemogu kroz njega proci da nestane kao prvi..
Poslednja Izmena: Septembar 21, 2010, 00:10:41 PRE PODNE od Vjeran

evo ti neki primjeri
if(strcmp(cmd, "/ruta1", true) == 0)
{
   if(IsPlayerConnected(playerid))
  {
       if(PlayerInfo[playerid][pJob] == 16)
{
   if(PlayerOnMission[playerid] > 0)
   {
       SendClientMessage(playerid, COLOR_GREY, "   Trenutno ste na misiji, nemozete koristiti ovu komandu !");
       return 1;
   }
       if(PlayerInfo[playerid][pRuta1] == 0)
       {
           GameTextForPlayer(playerid, "~w~Prenesite naftu iz ~r~San Fierra", 5000, 1);
           CP[playerid] = 16;
           SetPlayerCheckpoint(playerid, -1805.9058,64.5985,14.7246,8.0);
       }
       else
       {
           SendClientMessage(playerid, COLOR_GREY, "   Vec ste prenjeli posiljku, pricekajte  1 minutu te odaberite Rutu !");
       }
}
else
{
SendClientMessage(playerid, COLOR_GREY, "   Niste vozac kamiona !");
}
}//not connected
return 1;
}


if(CP[playerid] == 16)//ruta 1
{
GameTextForPlayer(playerid, "~w~Poceli ste prevozit  ~n~~r~Naftu", 5000, 1);
DisablePlayerCheckpoint(playerid);
CP[playerid] = 108;
SetPlayerCheckpoint(playerid, -1805.9058,64.5985,14.7246,8.0);
}
if(CP[playerid] == 108) { CP[playerid] = 109; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,-1805.9058,64.5985,14.7246,8.0); }//RUTA 1
else if(CP[playerid] == 109) { CP[playerid] = 110; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,-1802.2156,-159.4107,8.0942,8.0); }//RUTA 2
else if(CP[playerid] == 110) { CP[playerid] = 111; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,-1815.5449,-404.1072,15.7815,8.0); }//RUTA 3
else if(CP[playerid] == 111) { CP[playerid] = 112; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,-1819.4063,-568.6556,16.1037,8.0); }//ruta 4
else if(CP[playerid] == 112) { CP[playerid] = 113; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,-1764.5992,-630.5197,17.4039,8.0); }//RUTA 5
else if(CP[playerid] == 113) { CP[playerid] = 114; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,-1692.5559,-760.0424,39.7682,8.0); }//ruta 6
else if(CP[playerid] == 114) { CP[playerid] = 115; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,-1526.9343,-818.5987,56.5874,8.0); }//ruta 7
else if(CP[playerid] == 115) { CP[playerid] = 116; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,-1349.2634,-817.8057,77.2705,8.0); }//ruta 8
else if(CP[playerid] == 116) { CP[playerid] = 117; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,-1171.9075,-659.8380,44.9968,8.0); }//Ruta 9
else if(CP[playerid] == 117) { CP[playerid] = 118; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,-1103.8671,-501.3656,32.1262,8.0); }//ruta 10
else if(CP[playerid] == 118) { CP[playerid] = 119; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,-1046.7745,-462.3519,35.1721,8.0); }//ruta 11
else if(CP[playerid] == 119) { CP[playerid] = 120; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,-1038.1851,-567.9130,31.7350,8.0); }//ruta 12
else if(CP[playerid] == 120) { CP[playerid] = 121; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,-1031.5090,-674.5381,31.7358,8.0); }//ruta 13
else if(CP[playerid] == 121)//Kraj rute 1
   {
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Prevezli ste naftu i zaradili $1000.");
DisablePlayerCheckpoint(playerid);
GivePlayerMoney(playerid, 1000);
CP[playerid] = 0;
PlayerInfo[playerid][pRuta1] = 100;
}


ako neshvacas pitaj...

evo popravio sam ti greska ti je
else if(CP[playerid] == 302) { CP[playerid] = 303; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1286.2234,-170.0846,30.3568,10.0); } //2
    else if(CP[playerid] == 303) { CP[playerid] = 304; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1200.4286,-90.7484,38.7524,10.0); } //3
    else if(CP[playerid] == 304) { CP[playerid] = 305; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 962.7036,-87.2479,18.9034,10.0); } //4


ako ti ide 302-303, na drugom ti pise diasableplayercheckpoint naci iskljucujes 303,stavljas 304 kuzis?
Poslednja Izmena: Septembar 21, 2010, 00:47:24 PRE PODNE od Kiki_Radeon

Jeeeeeeeee...Skuzio sam..Jao koja sam ja noobina xD..Ugl.

HVALA TI ;)

haha...ma sve 5 nema problema... samo malo da si razmislio.. i to je to :D uzivaj