Szerző Téma: Három script összerakása  (Megtekintve 799 alkalommal)

Nem elérhető Domba

  • 391
    • Profil megtekintése
Három script összerakása
« Dátum: 2010. augusztus 21. - 18:50:32 »
0 Show voters
Üdv!
Valamelyikötök csinálja meg nekem legyenszíves, hogy három script-et egybe csinál.
Itt az első script kodjai:
//-------------------------------------------
//            Script by Pghpunkid\'s
//        Auto Race Creator Program V1.3
//          Need Help? http://rsc.us.to
//-------------------------------------------
//           Terms and Agreements
//-------------------------------------------
//By using this script you agree to these terms
//and agreements:
//You may alter the produced script to enhance
//the playability, however, changed made to
//claim work as your own is strictly prohibited.
//Feel free to distribute your compiled script
//however,give credit the actual author, Pghpunkid.
//if you agree to these terms and agreements,
//remove the \'//\' before #include <a_samp>
#include <a_samp>
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_LAVENDER 0xFF00FFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_LIGHTBLUEA 0xB5EAFCAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_TEAL 0x3BAAC2AA
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
forward CheckpointUpdate();
forward GPRaceCountdown();
forward GPTimer();
forward SaveTimes();
forward LoadTimes();
forward UpdateList(playerid,TimeRec);
new Mototime[MAX_PLAYERS] =0;
new Motocountdown[MAX_PLAYERS] =-1;
new MotoGP[MAX_PLAYERS] = 0;
new MotoGate[MAX_PLAYERS]=0;
#define MAX_POINTS 1
#define MAX_RACE_POINTS 5
new cps = MAX_RACE_POINTS;
#define TT_START 0
enum kinfo{
    Driver[24],
    Time
}
new KartHS[5][kinfo];
new playerCheckpoint[MAX_PLAYERS];
new Float:checkpoints[MAX_POINTS][3] = {
{-302.6608,1510.0677,75.0157}
};
new Float:racecheckpoints[MAX_RACE_POINTS][3] = {
{-294.7813,1411.1427,71.9585},
{
-346.6508,1457.0532,64.6989},
{
-334.6773,1362.0303,55.4494},
{
-344.9471,1325.3297,50.6068},
{
-432.2404,1441.7882,33.7289}
};
new checkpointType[MAX_POINTS] = {
    TT_START
};
public OnFilterScriptInit()
{
    print(\"\\n Mode:Drift  - Created using Pghpunkids Script Creator.\\n\");
    SetTimer(\"CheckpointUpdate\",1000,1);
    SetTimer(\"GPRaceCountdown\",1000,1);
    SetTimer(\"GPTimer\",1000,1);
    for(new t=0; t<5; t++)
    {
        strmid(KartHS[t][Driver], \"None\", 0, strlen(\"None\"), 24);
        KartHS[t][Time]=100000;
    }
    if(!fexist(\"Drift Times.cfg\"))
        SaveTimes();
    LoadTimes();
    return 1;
}
public SaveTimes()
{
    print(\"[race] Drift  Times Saved.\");
    new File: hFile = fopen(\"Drift Times.cfg\", io_write);
    if (hFile)
    {
        for(new t= 0; t<5; t++)
        {
            new var[32];
            format(var, 32, \"%s\\n\",KartHS[t][Driver]);fwrite(hFile, var);
            format(var, 32, \"%d\\n\",KartHS[t][Time]);fwrite(hFile, var);
        }
    }
    fclose(hFile);
    return 1;
}
public LoadTimes()
{
    print(\"[race] Drift  Times Loaded.\");
    new File: file = fopen(\"Drift Times.cfg\", io_read);
    if (file)
    {
        new valtmp[128];
        for(new t=0; t<5; t++)
        {
            fread(file, valtmp);strmid(KartHS[t][Driver], valtmp, 0, strlen(valtmp)-1, 128);DelPrint(valtmp);
            fread(file, valtmp);KartHS[t][Time] = strval(valtmp);DelPrint(valtmp);
        }
    }
    return 1;
}
public OnPlayerDisconnect(playerid,reason)
{
    MotoGP[playerid] =0;
    Mototime[playerid] =0;
    return 1;
}
public OnFilterScriptExit()
{
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp(\"/rdrift\", cmdtext, true, 10) == 0)
    {
        if(getCheckpointType(playerid)!=TT_START)
        {
            SendClientMessage(playerid,COLOR_GREEN,\"You must be at the Drift  starting location.\");
            return 1;
        }
        SendClientMessage(playerid, COLOR_GREEN,\"Starting..\");
        SetCameraBehindPlayer(playerid);
        TogglePlayerControllable(playerid,0);
        Motocountdown[playerid] = 6;
        SetPlayerRaceCheckpoint(playerid,0,racecheckpoints[0][0],racecheckpoints[0][1],racecheckpoints[0][2],racecheckpoints[1][0],racecheckpoints[1][1],racecheckpoints[1][2],10);
        DisablePlayerCheckpoint(playerid);
        return 1;
    }
    if (strcmp(\"/tdrift\", cmdtext, true, 10) == 0)
    {
        new kstring[255];
        SendClientMessage(playerid,COLOR_GREEN,\"Top 5 Times:\");
        for(new z=0; z<5; z++)
        {
            new sec = KartHS[z][Time]%60;
            new mins = (KartHS[z][Time]/60)%60;
            if (strcmp(\"None\",KartHS[z][Driver], true, 10) == 0)
            {
                if(z==0)
                    SendClientMessage(playerid,COLOR_GREY,\"-No Times Recorded Yet-\");
                if(z>0)
                    SendClientMessage(playerid,COLOR_GREY,\"-End Of Time Sheet-\");
                return 1;
            }
            if(strcmp(\"None\",KartHS[z][Driver], true,10) != 0)
            {
                if(sec > 9) {format(kstring,sizeof(kstring),\"%d. %s - %d:%d\",z+1,KartHS[z][Driver],mins,sec);}
                if(sec < 9) {format(kstring,sizeof(kstring),\"%d. %s - %d:0%d\",z+1,KartHS[z][Driver],mins,sec);}
                SendClientMessage(playerid,COLOR_GREY,kstring);
            }
        }
        return 1;
    }
    return 0;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
    new sec = Mototime[playerid]%60;
    new mins = (Mototime[playerid]/60)%60;
    if(MotoGP[playerid] == 1)
    {
        MotoGate[playerid]++;
        new one = MAX_RACE_POINTS-1;
        new two = MAX_RACE_POINTS;
        if(MotoGate[playerid] < one)
        {
            DisablePlayerRaceCheckpoint(playerid);
            SetPlayerRaceCheckpoint(playerid,0,racecheckpoints[MotoGate[playerid]][0],racecheckpoints[MotoGate[playerid]][1],racecheckpoints[MotoGate[playerid]][2],racecheckpoints[MotoGate[playerid]+1][0],racecheckpoints[MotoGate[playerid]+1][1],racecheckpoints[MotoGate[playerid]+1][2],10);
           
        }
        if(MotoGate[playerid] == one)
        {
            DisablePlayerRaceCheckpoint(playerid);
            SetPlayerRaceCheckpoint(playerid,1,racecheckpoints[MotoGate[playerid]][0],racecheckpoints[MotoGate[playerid]][1],racecheckpoints[MotoGate[playerid]][2],racecheckpoints[0][0],racecheckpoints[0][1],racecheckpoints[0][2],10);
        }
        if(MotoGate[playerid] == two)
        {
            new TimeRec;
            new Timestr[255];
            new driver[24];
            GetPlayerName(playerid,driver,sizeof(driver));
            format(Timestr,sizeof(Timestr),\"%s finished the Drift  in %d Mins, %d Seconds.\",driver,mins,sec);
            SendClientMessageToAll(COLOR_WHITE,Timestr);
            SendClientMessage(playerid,COLOR_WHITE,\"You can view the Top 5 Times with /tdrift.\");
            printf(Timestr);
            TimeRec=Mototime[playerid];
            MotoGP[playerid] = 0;
            MotoGate[playerid] = 0;
            DisablePlayerRaceCheckpoint(playerid);
            Mototime[playerid]=0;
            UpdateList(playerid,TimeRec);
        }
    }
    return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
    if(getCheckpointType(playerid)==TT_START)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            SendClientMessage(playerid,COLOR_GREEN,\"You can use /rdrift to start Drift.\");
            return 1;
        }
        else
   {
      SendClientMessage(playerid,COLOR_GREEN,\"You Need a Vehicle For This Race\");
   }
    }
    return 1;
}
stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
    new Float:oldposx, Float:oldposy, Float:oldposz;
    new Float:tempposx, Float:tempposy, Float:tempposz;
    GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    tempposx = (oldposx -x);
    tempposy = (oldposy -y);
    tempposz = (oldposz -z);
    if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
    {
        return 1;
    }
    return 0;
}
public UpdateList(playerid, TimeRec)
{
    new driver[24];
    GetPlayerName(playerid,driver,sizeof(driver));
    if(KartHS[0][Time] > TimeRec)
    {
        KartHS[4][Time] = KartHS[3][Time];
        strmid(KartHS[4][Driver],KartHS[3][Driver],0,sizeof(driver),24);
        KartHS[3][Time] = KartHS[2][Time];
        strmid(KartHS[3][Driver],KartHS[2][Driver],0,sizeof(driver),24);
        KartHS[2][Time] = KartHS[1][Time];
        strmid(KartHS[2][Driver],KartHS[1][Driver],0,sizeof(driver),24);
        KartHS[1][Time] = KartHS[0][Time];
        strmid(KartHS[1][Driver],KartHS[0][Driver],0,sizeof(driver),24);
        KartHS[0][Time] = TimeRec;
        strmid(KartHS[0][Driver],driver,0,sizeof(driver),24);
        SendClientMessage(playerid,COLOR_GREY,\"Your Time Was 1st Overall!\");
    }
    else if(KartHS[1][Time] > TimeRec)
    {
        KartHS[4][Time] = KartHS[3][Time];
        strmid(KartHS[4][Driver],KartHS[3][Driver],0,sizeof(driver),24);
        KartHS[3][Time] = KartHS[2][Time];
        strmid(KartHS[3][Driver],KartHS[2][Driver],0,sizeof(driver),24);
        KartHS[2][Time] = KartHS[1][Time];
        strmid(KartHS[2][Driver],KartHS[1][Driver],0,sizeof(driver),24);
        KartHS[1][Time] = TimeRec;
        strmid(KartHS[1][Driver],driver,0,sizeof(driver),24);
        SendClientMessage(playerid,COLOR_GREY,\"Your Time Was 2nd Overall!\");
    }
    else if(KartHS[2][Time] > TimeRec)
    {
        KartHS[4][Time] = KartHS[3][Time];
        strmid(KartHS[4][Driver],KartHS[3][Driver],0,sizeof(driver),24);
        KartHS[3][Time] = KartHS[2][Time];
        strmid(KartHS[3][Driver],KartHS[2][Driver],0,sizeof(driver),24);
        KartHS[2][Time] = TimeRec;
        strmid(KartHS[2][Driver],driver,0,sizeof(driver),24);
        SendClientMessage(playerid,COLOR_GREY,\"Your Time Was 3rd Overall!\");
    }
    else if(KartHS[3][Time] > TimeRec)
   {
        KartHS[4][Time] = KartHS[3][Time];
        strmid(KartHS[4][Driver],KartHS[3][Driver],0,sizeof(driver),24);
        KartHS[3][Time] = TimeRec;
        strmid(KartHS[3][Driver],driver,0,sizeof(driver),24);
        SendClientMessage(playerid,COLOR_GREY,\"Your Time Was 4th Overall!\");
   }
    else if(KartHS[4][Time] > TimeRec)
    {
        KartHS[4][Time] = TimeRec;
        strmid(KartHS[4][Driver],driver,0,sizeof(driver),24);
        SendClientMessage(playerid,COLOR_GREY,\"Your Time Was 5th Overall!\");
    }
    SaveTimes();
    LoadTimes();
    return 1;
}
public CheckpointUpdate()
{
    for(new i; i<MAX_PLAYERS; i++)
    {
        if(MotoGP == 0)

        {


            for(new j=0; j < 1; j++) {


                if(PlayerToPoint(25,i,checkpoints[j][0],checkpoints[j][1],checkpoints[j][2])) {


                   if(playerCheckpoint
!=j) {

                        DisablePlayerCheckpoint(i);


                        SetPlayerCheckpoint(i, checkpoints[j][0],checkpoints[j][1],checkpoints[j][2],5);


                        playerCheckpoint
= j;

                    }


                } else {


                    if(playerCheckpoint
==j) {

                        DisablePlayerCheckpoint(i);


                        playerCheckpoint
= 999;

                    }


                }


            }


        }


    }


}


stock getCheckpointType(playerID) {


    if(playerCheckpoint[playerID] != 999)


        return checkpointType[playerCheckpoint[playerID]];


    else return -1;


}


public GPRaceCountdown()


{


    for(new x=0; x<MAX_PLAYERS; x++)


    {


        if(Motocountdown
  • > 0)


        {


            new time[3];


            Motocountdown
  • --;


            format(time,sizeof(time),\"%d\",Motocountdown
  • );


            PlayerPlaySound(x, 1056, 0, 0, 0);


            GameTextForPlayer(x,time,1200,3);


        }


        if(Motocountdown
  • == 0)


        {


            GameTextForPlayer(x,\"GO!\",1200,3);


            PlayerPlaySound(x, 1057, 0, 0, 0);


            TogglePlayerControllable(x,1);


            Motocountdown
  • --;


            Mototime
  • =0;


            MotoGP
  • =1;


        }


    }


}


public GPTimer()


{


    for(new i=0; i<MAX_PLAYERS; i++)


    {


        new progress[255];


        new sec = Mototime
%60;

        new mins = (Mototime
/60)%60;

        if(MotoGP
== 1)

       {


            Mototime
++;

           


            if(sec > 9 ) { format(progress,sizeof(progress),\"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~b~Race %d/%d Checkpoints Achieved. Current Time: %d:%d\",MotoGate
,cps,mins,sec);}

            if(sec <10 ) { format(progress,sizeof(progress),\"~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~b~Race: %d/%d Checkpoints Achieved. Current Time: %d:0%d\",MotoGate
,cps,mins,sec);}

            GameTextForPlayer(i,progress,1200,3);


        }


    }


}


stock DelPrint(string1[])


{


    strmid(string1, string1, 0, strlen(string1)-1, 255);


    printf(\"%s\", string1);


    return 1;


}


public OnPlayerConnect(playerid)


{


                MotoGP[playerid] = 0;


                MotoGate[playerid] = 0;


                DisablePlayerRaceCheckpoint(playerid);


                Mototime[playerid]=0;


    return 1;


}


public OnPlayerStateChange(playerid, newstate, oldstate)


{


        if (MotoGP[playerid] == 1 && (newstate == 1 && oldstate == 2))


        {


                MotoGP[playerid] = 0;


                MotoGate[playerid] = 0;


                DisablePlayerRaceCheckpoint(playerid);


                Mototime[playerid]=0;


        }


        return 1;


}


public OnPlayerDeath(playerid, killerid, reason)


{


MotoGP[playerid] = 0;


MotoGate[playerid] = 0;


DisablePlayerRaceCheckpoint(playerid);


Mototime[playerid]=0;


return 1;


}


Második script kodjai:


//-------------------------------------------


//            Script by Pghpunkid\'s


//        Auto Race Creator Program V1.3


//          Need Help?
http://rsc.us.to


//-------------------------------------------


//           Terms and Agreements


//-------------------------------------------


//By using this script you agree to these terms


//and agreements:


//You may alter the produced script to enhance


//the playability, however, changed made to


//claim work as your own is strictly prohibited.


//Feel free to distribute your compiled script


//however,give credit the actual author, Pghpunkid.


//if you agree to these terms and agreements,


//remove the \'//\' before #include <a_samp>


#include <a_samp>


#define COLOR_GREY 0xAFAFAFAA


#define COLOR_GREEN 0x33AA33AA


#define COLOR_RED 0xAA3333AA


#define COLOR_YELLOW 0xFFFF00AA


#define COLOR_WHITE 0xFFFFFFAA


#define COLOR_LAVENDER 0xFF00FFAA


#define COLOR_BLUE 0x0000BBAA


#define COLOR_LIGHTBLUE 0x33CCFFAA


#define COLOR_LIGHTBLUEA 0xB5EAFCAA


#define COLOR_ORANGE 0xFF9900AA


#define COLOR_TEAL 0x3BAAC2AA


forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);


forward CheckpointUpdate();


forward GPRaceCountdown();


forward GPTimer();


forward SaveTimes();


forward LoadTimes();


forward UpdateList(playerid,TimeRec);


new Mototime[MAX_PLAYERS] =0;


new Motocountdown[MAX_PLAYERS] =-1;


new MotoGP[MAX_PLAYERS] = 0;


new MotoGate[MAX_PLAYERS]=0;


new Float: X;


new Float: Y;


new Float: Z;


#define MAX_POINTS 1


#define MAX_RACE_POINTS 8


new cps = MAX_RACE_POINTS;


#define TT_START 0


enum kinfo{


    Driver[24],


    Time


}


#define CARS 212


new vehicleNames[CARS][] = {


\"Landstalker\",


\"Bravura\",


\"Buffalo; \",


\"Linerunner\",


\"Pereniel\",


\"Sentinel \",


\"Dumper\",


\"Firetruck\",


\"Trashmaster\",


\"Stretch\",


\"Manana\",


\"Infernus\",


\"Voodoo\",


\"Pony\",


\"Mule\",


\"Cheetah\",


\"Ambulance\",


\"Leviathan\",


\"Moonbeam\",


\"Esperanto\",


\"Taxi\",


\"Washington\",


\"Bobcat\",


\"Mr Whoopee\",


\"BF Injection\",


\"Hunter\",


\"Premier\",


\"Enforcer\",


\"Securicar\",


\"Banshee\",


\"Predator\",


\"Bus\",


\"Rhino\",


\"Barracks\",


\"Hotknife\",


\"Trailer\",


\"Previon\",


\"Coach\",


\"Cabbie\",


\"Stallion\",


\"Rumpo\",


\"RC Bandit\",


\"Romero\",


\"Packer\",


\"Monster\",


\"Admiral\",


\"Squalo\",


\"Seasparrow\",


\"Pizzaboy\",


\"Tram\",


\"Trailer\",


\"Turismo\",


\"Speeder\",


\"Reefer\",


\"Tropic\",


\"Flatbed\",


\"Yankee\",


\"Caddy\",


\"Solair\",


\"Berkley\'s RC Van\",


\"Skimmer\",


\"PCJ600\",


\"Faggio\",


\"Freeway\",


\"RC Baron\",


\"RC Raider\",


\"Glendale\",


\"Oceanic\",


\"Sanchez\",


\"Sparrow\",


\"Patriot\",


\"Quad\",


\"Coastguard\",


\"Dinghy\",


\"Hermes\",


\"Sabre\",


\"Rustler\",


\"ZR3 50\",


\"Walton\",


\"Regina\",


\"Comet\",


\"BMX\",


\"Burrito\",


\"Camper\",


\"Marquis\",


\"Baggage\",


\"Dozer\",


\"Maverick\",


\"News Chopper\",


\"Rancher\",


\"FBI Rancher\",


\"Virgo\",


\"Greenwood\",


\"Jetmax\",


\"Hotring\",


\"Sandking\",


\"Blista Compact\",


\"Police Maverick\",


\"Boxville\",


\"Benson\",


\"Mesa\",


\"RC Goblin\",


\"Hotring Racer\",


\"Hotring Racer\",


\"Bloodring Banger\",


\"Rancher\",


\"Super GT\",


\"Elegant\",


\"Journey\",


\"Bike\",


\"Mountain Bike\",


\"Beagle\",


\"Cropdust\",


\"Stunt\",


\"Tanker\",


\"RoadTrain\",


\"Nebula\",


\"Majestic\",


\"Buccaneer\",


\"Shamal\",


\"Hydra\",


\"FCR900\",


\"NRG500\",


\"HPV1000\",


\"Cement Truck\",


\"Tow Truck\",


\"Fortune\",


\"Cadrona\",


\"FBI Truck\",


\"Willard\",


\"Forklift\",


\"Tractor\",


\"Combine\",


\"Feltzer\",


\"Remington\",


\"Slamvan\",


\"Blade\",


\"Freight\",


\"Streak\",


\"Vortex\",


\"Vincent\",


\"Bullet\",


\"Clover\",


\"Sadler\",


\"Firetruck\",


\"Hustler\",


\"Intruder\",


\"Primo\",


\"Cargobob\",


\"Tampa\",


\"Sunrise\",


\"Merit\",


\"Utility\",


\"Nevada\",


\"Yosemite\",


\"Windsor\",


\"Monster\",


\"Monster\",


\"Uranus\",


\"Jester\",


\"Sultan\",


\"Stratum\",


\"Elegy\",


\"Raindance\",


\"RC Tiger\",


\"Flash\",


\"Tahoma\",


\"Savanna\",


\"Bandito\",


\"Freight\",


\"Trailer\",


\"Kart\",


\"Mower\",


\"Duneride\",


\"Sweeper\",


\"Broadway\",


\"Tornado\",


\"AT400\",


\"DFT30\",


\"Huntley\",


\"Stafford\",


\"BF400\",


\"Newsvan\",


\"Tug\",


\"Trailer\",


\"Emperor\",


\"Wayfarer\",


\"Euros\",


\"Hotdog\",


\"Club\",


\"Trailer\",


\"Trailer\",


\"Andromada\",


\"Dodo\",


\"RC Cam\",


\"Launch\",


\"Police Car\",


\"Police Car\",


\"Police Car\",


\"Ranger\",


\"Picador\",


\"S.W.A.T.Van\",


\"Alpha\",


\"Phoenix\",


\"Glendale\",


\"Sadler\",


\"Luggage Trailer\",


\"Luggage Trailer\",


\"Stair Trailer\",


\"Boxville\",


\"Farm Plow\",


\"Utility Trailer\"


};


new KartHS[5][kinfo];


new playerCheckpoint[MAX_PLAYERS];


new Float:checkpoints[MAX_POINTS][3] = {


{-2426.4492,-603.5380,132.5625}


};


new Float:racecheckpoints[MAX_RACE_POINTS][3] = {


{-2489.7510,-479.7276,96.6674},


{


-2627.9988,-496.5181,70.2699},


{


-2493.3794,-446.1037,76.4856},


{


-2320.6882,-452.9081,79.7097},


{


-2488.4639,-366.7541,63.5431},


{


-2674.9060,-466.5049,26.2611},


{


-2730.9324,-526.7504,8.2808},


{


-2796.3240,-480.4056,6.9151}


};


new checkpointType[MAX_POINTS] = {


    TT_START


};


public OnFilterScriptInit()


{


    print(\"\\n Mode:Drift 2 - Created using Pghpunkids Script Creator.\\n\");


    SetTimer(\"CheckpointUpdate\",1000,1);


    SetTimer(\"GPRaceCountdown\",1000,1);


    SetTimer(\"GPTimer\",1000,1);


    for(new t=0; t<5; t++)


    {


        strmid(KartHS[t][Driver], \"None\", 0, strlen(\"None\"), 24);


        KartHS[t][Time]=100000;


    }


    if(!fexist(\"Drift 2Times.cfg\"))


        SaveTimes();


    LoadTimes();


    return 1;


}


public SaveTimes()


{


    print(\"[race] Drift 2 Times Saved.\");


    new File: hFile = fopen(\"Drift 2Times.cfg\", io_write);


    if (hFile)


    {


        for(new t= 0; t<5; t++)


        {


            new var[32];


            format(var, 32, \"%s\\n\",KartHS[t][Driver]);fwrite(hFile, var);


            format(var, 32, \"%d\\n\",KartHS[t][Time]);fwrite(hFile, var);


        }


    }


    fclose(hFile);


    return 1;


}


public LoadTimes()


{


    print(\"[race] Drift 2 Times Loaded.\");


    new File: file = fopen(\"Drift 2Times.cfg\", io_read);


    if (file)


    {


        new valtmp[128];


        for(new t=0; t<5; t++)


        {


            fread(file, valtmp);strmid(KartHS[t][Driver], valtmp, 0, strlen(valtmp)-1, 128);DelPrint(valtmp);


            fread(file, valtmp);KartHS[t][Time] = strval(valtmp);DelPrint(valtmp);


        }


    }


    return 1;


}


public OnPlayerDisconnect(playerid,reason)


{


MotoGP[playerid] = 0;


MotoGate[playerid] = 0;


DisablePlayerRaceCheckpoint(playerid);


Mototime[playerid]=0;


    return 1;


}


public OnFilterScriptExit()


{


    return 1;


}


public OnPlayerCommandText(playerid, cmdtext[])


{


    if (strcmp(\"/rdrift2\", cmdtext, true, 10) == 0)


    {


        if(getCheckpointType(playerid)!=TT_START)


        {


            SendClientMessage(playerid,COLOR_GREEN,\"You must be at the Drift 2 starting location.\");


            return 1;


        }


        if(!IsVehicle(playerid))


        {


            new fstr[255];


            format(fstr,sizeof(fstr),\"You must be in a %s to participate in this.\",vehicleNames[562-400]);


            SendClientMessage(playerid,COLO
« Utoljára szerkesztve: 2010. augusztus 21. - 18:52:10 írta Domba »

Három script összerakása
« Válasz #1 Dátum: 2010. augusztus 21. - 19:15:07 »
0 Show voters
Ezeket a scripteket rakd [*code][*/code] tagek közé,csillagok nélkül.
Így elég érdekes...De azért megnézem mit tehetek.
Szerk: Semmit,nemtudok/tudunk segíteni,lemaradt a script vége....
« Utoljára szerkesztve: 2010. augusztus 21. - 19:16:56 írta ChuckNorris »

Három script összerakása
« Válasz #2 Dátum: 2010. augusztus 21. - 21:05:47 »
0 Show voters
Bmeg nem lett volna kibaszott sokkal egyszerûbb, ha felrakod azt a 3 számbarakott scriptet pl solidfiles-re, és belinkeled???

Nem elérhető Iceaac

  • 2187
    • Profil megtekintése
Három script összerakása
« Válasz #3 Dátum: 2010. augusztus 21. - 21:42:55 »
0 Show voters
Tartsd be a szabályzatot, mert már téged is unlak, Domba.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal