[Pomoc]

Započeo Brabus, Septembar 20, 2010, 01:00:46 PRE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Ovako, radim malo na kucnom serveru pa me zanima kako dodati jos CP-ova odnosno checkpointa da se nastavlja event

Ovo je primjer za karting u obicnoj GF scripti

else if(CP[playerid] == 10) { CP[playerid] = 11; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2258.7874,-2402.9712,12.7035,8.0); }
    else if(CP[playerid] == 11) { CP[playerid] = 12; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2225.8755,-2461.3875,12.7190,8.0); }
    else if(CP[playerid] == 12) { CP[playerid] = 13; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2276.9983,-2662.8328,12.8580,8.0); }
    else if(CP[playerid] == 13) { CP[playerid] = 14; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2449.1399,-2663.0562,12.8138,8.0); }
    else if(CP[playerid] == 14) { CP[playerid] = 15; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2566.9814,-2504.5686,12.7692,8.0); }
    else if(CP[playerid] == 15) { CP[playerid] = 16; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2719.0520,-2503.5962,12.7706,8.0); }
    else if(CP[playerid] == 16) { CP[playerid] = 17; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2720.7881,-2405.6589,12.7441,8.0); }
    else if(CP[playerid] == 17) { CP[playerid] = 18; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2571.5195,-2401.1531,12.7528,8.0); }
    else if(CP[playerid] == 18) { CP[playerid] = 19; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2406.6995,-2423.1182,12.6641,8.0); }
    else if(CP[playerid] == 19) { CP[playerid] = 20; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2322.9194,-2341.5715,12.6664,8.0); }
    else if(CP[playerid] == 20)//End of Karting


To ide za karting, ali ako cu ja ubaciti tu nutra, onda ce se nastaviti karting..

A mene zanima event na ovaj sistem ->
if (strcmp(cmd, "/bikerace", true)==0)
    {
        if(PlayerInfo[playerid][pAdmin] >= 2)
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "KORISTITE: /bikerace[playerid/PartOfName]");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            if (PlayerInfo[playerid][pAdmin] >= 2)
            {
                if(IsPlayerConnected(giveplayerid))
                {
                    SetPlayerCheckpoint(giveplayerid, 1838.6783,-2594.1719,13.2518,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 bike start liniju!", sendername, giveplayer);
                    SendClientMessageToAll(COLOR_LIGHTRED, string);
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD2, " Niste autorizirani za koristenje ove naredbe !");
            }
        }
        return 1;
    }


I kako sad ubacim ostale CP-ove unutra?? Pomoc onih koji znaju, bio bih zahvalan x)

DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid,2322.9194,-2341.5715,12.6664,8.0); }
    else if(CP[playerid] == 20)



evo samo produzis nastavak dakle di ti je zadnji cp samo produzs(dakle kopiraj ovaj kod i samo zaljepi tamo di ti je zadni

Onda ide ovako?

else if(CP[playerid] == 21) { CP[playerid] = 22; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1521.8499,-179.7902,13.3110,50.0); } //1
    else if(CP[playerid] == 23) { CP[playerid] = 24; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1286.2234,-170.0846,30.3568,50.0); } //2
    else if(CP[playerid] == 25) { CP[playerid] = 26; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1200.4286,-90.7484,38.7524,50.0); } //3
    else if(CP[playerid] == 27) { CP[playerid] = 28; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 962.7036,-87.2479,18.9034,50.0); } //4
    else if(CP[playerid] == 29) { CP[playerid] = 30; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 769.9377,-139.8710,20.3013,50.0); } //5
    else if(CP[playerid] == 31) { CP[playerid] = 32; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 611.4811,-197.5253,10.6464,50.0); } //6
    else if(CP[playerid] == 33) { CP[playerid] = 34; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 492.5997,-245.9262,10.5580,50.0); } //7
    else if(CP[playerid] == 35) { CP[playerid] = 36; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 384.4020,-319.6907,13.4841,50.0); } //8
    else if(CP[playerid] == 37) { CP[playerid] = 38; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 281.1916,-380.2357,8.5657,50.0); } //9
    else if(CP[playerid] == 39) { CP[playerid] = 40; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 216.0190,-335.5003,3.0227,50.0); } //10
    else if(CP[playerid] == 41) { CP[playerid] = 42; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 179.9366,-302.6471,1.2780,50.0); } //11
    else if(CP[playerid] == 43) { CP[playerid] = 44; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 125.7937,-268.7326,1.2834,50.0); } //12
    else if(CP[playerid] == 45) { CP[playerid] = 46; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 38.7312,-207.4253,1.1733,50.0); } //13
    else if(CP[playerid] == 47) { CP[playerid] = 48; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, -72.8204,-183.0299,1.6553,50.0); } //14
    else if(CP[playerid] == 49) { CP[playerid] = 50; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, -112.9909,-111.6681,2.8219,50.0); } //15
    else if(CP[playerid] == 51) { CP[playerid] = 52; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, -119.3776,-61.5719,2.8186,50.0); } //16
    else if(CP[playerid] == 53) { CP[playerid] = 54; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, -112.0549,16.9704,2.8224,50.0); } //17
    else if(CP[playerid] == 55) { CP[playerid] = 56; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, -110.7265,72.3734,2.8227,50.0); } //18
    else if(CP[playerid] == 57) { CP[playerid] = 58; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, -237.2386,136.6670,1.7838,50.0); } //19
    else if(CP[playerid] == 59) { CP[playerid] = 60; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, -206.2007,205.4383,11.0507,50.0); } //20
    else if(CP[playerid] == 61) { CP[playerid] = 62; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, -105.5694,175.6377,3.4948,50.0); } //21
    else if(CP[playerid] == 63) { CP[playerid] = 64; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 94.2721,51.7361,0.3934,50.0); } //22
    else if(CP[playerid] == 65) { CP[playerid] = 66; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 103.8831,-105.4747,1.2470,50.0); } //23
    else if(CP[playerid] == 67) { CP[playerid] = 68; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 157.2163,-138.9981,1.1358,50.0); } //24
    else if(CP[playerid] == 21) { CP[playerid] = 22; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 209.3210,-148.3818,1.2909,50.0); } //25
    else if(CP[playerid] == 23) { CP[playerid] = 24; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 272.2551,-149.2772,1.2816,50.0); } //26
    else if(CP[playerid] == 25) { CP[playerid] = 26; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 336.0162,-129.7286,1.1176,50.0); } //27
    else if(CP[playerid] == 27) { CP[playerid] = 28; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 343.1831,-94.2043,1.0886,50.0); } //28
    else if(CP[playerid] == 29) { CP[playerid] = 30; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 388.2799,-81.1790,2.6045,50.0); } //29
    else if(CP[playerid] == 31) { CP[playerid] = 32; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 421.7885,2.7641,5.9589,50.0); } //30
    else if(CP[playerid] == 33) { CP[playerid] = 34; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 528.2652,49.8116,19.9877,50.0); } //31
    else if(CP[playerid] == 35) { CP[playerid] = 36; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 543.3712,-13.5574,26.9681,50.0); } //32
    else if(CP[playerid] == 37) { CP[playerid] = 38; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 604.0934,-76.6452,18.2186,50.0); } //33
    else if(CP[playerid] == 39) { CP[playerid] = 40; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 694.5389,-26.1531,26.6319,50.0); } //34
    else if(CP[playerid] == 41) { CP[playerid] = 42; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 769.4503,24.0455,56.5662,50.0); } //35
    else if(CP[playerid] == 43) { CP[playerid] = 44; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 876.9989,19.7431,89.3949,50.0); } //36
    else if(CP[playerid] == 45) { CP[playerid] = 46; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 936.8731,-12.8168,91.0993,50.0); } //37
    else if(CP[playerid] == 47) { CP[playerid] = 48; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1087.5691,1.8645,70.8673,50.0); } //38
    else if(CP[playerid] == 49) { CP[playerid] = 50; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1166.2255,34.6131,45.8933,50.0); } //39
    else if(CP[playerid] == 51) { CP[playerid] = 52; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1239.2795,98.2635,20.8103,50.0); } //40
    else if(CP[playerid] == 53) { CP[playerid] = 54; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1265.3979,189.3782,19.1120,50.0); } //41
    else if(CP[playerid] == 55) { CP[playerid] = 56; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1297.2122,245.2154,19.1066,50.0); } //42
    else if(CP[playerid] == 57) { CP[playerid] = 58; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1376.9471,208.4402,19.1117,50.0); } //43
    else if(CP[playerid] == 59) { CP[playerid] = 60; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1509.9594,132.1037,30.9152,50.0); } //44
    else if(CP[playerid] == 61) { CP[playerid] = 62; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1545.9656,70.4942,27.1945,50.0); } //45
    else if(CP[playerid] == 63) { CP[playerid] = 64; DisablePlayerCheckpoint(playerid); SetPlayerCheckpoint(playerid, 1577.7350,27.8167,23.8347,50.0); } //46



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



A tu onda -> CP[giveplayerid] = 21; Mora ici 21 da se zna da otuda pocinje od 21-og checkpointa?