0kb compile 500lines script [HELP]
#3

You are missing a lot of brackets(5+)
Replace to those
pawn Код:
public OnVehicleDeath(vehicleid, killerid)
{
    for(new i=0; i<MAX_PLAYERS; i++) {
        if(isInExam[i] && examCarPlayer[i]==vehicleid) {
            if(timeChanged) {
                new h,m,s;
                #pragma unused s
                gettime(h,m,s); SetPlayerTime(i, h, m); timeChanged = false;
            }
            GameTextForPlayer(i, "~r~Ai picat examenul!", 10000, 5);
            SetVehicleToRespawn(vehicleid);
            isInExam[i]=0; checkpoint[i]=0; examCarPlayer[i]=0;
            for(new j=0; j<3; j++) {
                if(examCar[j][0]==vehicleid) {
                    examCar[j][1]=-1;
                    break;
                }
                SetPlayerWeather(i, 1);
                DisablePlayerCheckpoint(i);
                break;
            }
        }
    }
    return 1;
}

public OnVehicleRespray(playerid,vehicleid,color1,color2)
{
    if(isInExam[playerid]) {
        if(timeChanged) {
            new h,m,s;
            gettime(h,m,s); SetPlayerTime(playerid, h, m); timeChanged = false;
        }
        SendClientMessage(playerid,BLUE,"MARS CU HACKURILE TALE");
        GameTextForPlayer(playerid, "~r~Ai picat examenul!", 10000, 5);
        isInExam[playerid]=0; checkpoint[playerid]=0; examCarPlayer[playerid]=0;
        for(new i=0; i<3; i++) {
            if(examCar[i][0]==vehicleid) {
                examCar[i][1]=-1;
                break;
            }
        }
        SetPlayerWeather(playerid, 1);
        RemovePlayerFromVehicle(playerid); SetVehicleToRespawn(vehicleid);
        DisablePlayerCheckpoint(playerid);
    }
    return 1;
}


public OnVehicleMod(playerid, vehicleid, componentid)
{
    if(isInExam[playerid])
    {
        if(timeChanged)
        {
            new h,m,s;
            gettime(h,m,s); SetPlayerTime(playerid, h, m); timeChanged = false;
        }
        SendClientMessage(playerid,BLUE,"Incearca sa nu te mai lovesti!");
        GameTextForPlayer(playerid, "~r~Ai picat examenul!", 5000, 5);
        isInExam[playerid]=0; checkpoint[playerid]=0; examCarPlayer[playerid]=0;
        for(new i=0; i<3; i++)
        {
            if(examCar[i][0]==vehicleid)
            {
                examCar[i][1]=-1;
                break;
            }
            SetPlayerWeather(playerid, 1);
            RemovePlayerFromVehicle(playerid); RemoveVehicleComponent(vehicleid, componentid);
            SetVehicleToRespawn(vehicleid);
            DisablePlayerCheckpoint(playerid);
        }
    }
    return 1;
}

public OnVehicleDamageStatusUpdate(vehicleid, playerid)
{
    new Float:health;
    GetVehicleHealth(vehicleid,health);
    for(new i=0; i<MAX_PLAYERS; i++) {
        if(isInExam[i] && examCarPlayer[i]==vehicleid && playerid!=i) {
            FixCar(vehicleid); SetVehicleHealth(vehicleid, oldHP); allowHPchange = true;
            SendClientMessage(playerid,BLUE,"Nu te supara.... E doar un test ;))");
            break;
        }
        oldHP = health;
    }
    return 1;
}

public OnPlayerUpdate(playerid)
{
    if(IsPlayerInVehicle(playerid, examCarPlayer[playerid]) && isInExam[playerid]) {
        new Float:health;
        GetVehicleHealth(examCarPlayer[playerid], health);
        if(health > oldHP && allowHPchange==false) {
            if(timeChanged) {
                new h,m,s;
                gettime(h,m,s); SetPlayerTime(playerid, h, m); timeChanged = false;
            }
            SendClientMessage(playerid,BLUE,"MARS CU HACKURILE TALE!");
            GameTextForPlayer(playerid, "~r~Ai picat examenul!", 10000, 5);
            isInExam[playerid]=0; checkpoint[playerid]=0;
            for(new i=0; i<3; i++) {
                if(examCar[i][0]==examCarPlayer[playerid]) {
                    examCar[i][1]=-1;
                    break;
                }
                SetPlayerWeather(playerid, 1);
                RemovePlayerFromVehicle(playerid); SetVehicleToRespawn(examCarPlayer[playerid]);
                DisablePlayerCheckpoint(playerid);
                examCarPlayer[playerid]=0;
            }
        }
        else if(allowHPchange) allowHPchange = false;
    }
    return 1;
}


forward LoadLicense(playerid, name[], value[]);
public LoadLicense(playerid, name[], value[])
{
    INI_Int("DrivingLicense", Player[playerid]);
    return 0;
}


stock GetPlayerDrivingLicense(playerid)
{
    new name[MAX_PLAYER_NAME],string[256];
    GetPlayerName(playerid,name,sizeof(name));
    format(string,256,"Players/%s.ini",name);
    INI_ParseFile(string,"LoadLicense", .bExtra=true, .extra=playerid);
    return
}


stock SavePlayerLicense(playerid)
{
    new INI:player;
    new name[MAX_PLAYER_NAME],string[256];
    GetPlayerName(playerid,name,sizeof(name));
    format(string,256,"Players/%s.ini",name);
    player = INI_Open(string);
    INI_WriteInt(player, "DrivingLicense", Player[playerid]);
    INI_Close(player);
    return 1;
}


stock SetPlayerMoney(playerid, money)
{
    ResetPlayerMoney(playerid);
    GivePlayerMoney(playerid, money);
    return 1;
}


FixCar(vehicleid)
{
    new panels, doors, lights, tires;
    GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
    tires = encode_tires(0, 0, 0, 0);
    panels = encode_panels(0, 0, 0, 0, 0, 0, 0);
    doors = encode_doors(0, 0, 0, 0, 0, 0);
    lights = encode_lights(0, 0, 0, 0);
    UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
    return 1;
}


encode_tires(tire1, tire2, tire3, tire4) return tire1 | (tire2 << 1) | (tire3 << 2) | (tire4 << 3);
encode_panels(flp, frp, rlp, rrp, windshield, front_bumper, rear_bumper)
{
    return flp | (frp << 4) | (rlp << 8) | (rrp << 12) | (windshield << 16) | (front_bumper << 20) | (rear_bumper << 24);
}


encode_doors(bonnet, boot, driver_door, passenger_door, behind_driver_door, behind_passenger_door)
{
    #pragma unused behind_driver_door
    #pragma unused behind_passenger_door
    return bonnet | (boot << 8) | (driver_door << 16) | (passenger_door << 24);
}


encode_lights(light1, light2, light3, light4)
{
    return light1 | (light2 << 1) | (light3 << 2) | (light4 << 3);
}


// Ceas

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Ceas + Data by PwRh--------------------");
    print("--------------------------------------\n");

    SetTimer("settime",1000,true);

    Date = TextDrawCreate(547.000000,11.000000,"--");

    TextDrawFont(Date,3);
    TextDrawLetterSize(Date,0.399999,1.600000);
    TextDrawColor(Date,0xffffffff);

    Time = TextDrawCreate(547.000000,28.000000,"--");

    TextDrawFont(Time,3);
    TextDrawLetterSize(Time,0.399999,1.600000);
    TextDrawColor(Time,0xffffffff);

    SetTimer("settime",1000,true);
    return 1;
}


public OnFilterScriptExit()
{
    print("\n-----------------------------------------------------");
    print(" Ceas + Data by PwRh !---------------------------------");
    print("-----------------------------------------------------/n");
    return 1;
}


public OnPlayerSpawn(playerid)
{
    SendClientMessage(playerid, 0xF97804FF, "Contact pentru mai multe la : naruto4wnnk!");
    TextDrawShowForPlayer(playerid, Time), TextDrawShowForPlayer(playerid, Date);

    return 1;
}


public OnPlayerDisconnect(playerid, reason)
{
    TextDrawHideForPlayer(playerid, Time), TextDrawHideForPlayer(playerid, Date);
    return 1;
}


public settime(playerid)
{
    new string[256],year,month,day,hours,minutes,seconds;
    getdate(year, month, day), gettime(hours, minutes, seconds);
    format(string, sizeof string, "%d/%s%d/%s%d", day, ((month < 10) ? ("0") : ("")), month, (year < 10) ? ("0") : (""), year);
    TextDrawSetString(Date, string);
    format(string, sizeof string, "%s%d:%s%d:%s%d", (hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds);
    TextDrawSetString(Time, string);
    return 1;
}
Quote:
Originally Posted by KyleSmith
Посмотреть сообщение
Bit obvious 75 - 76 - Give rep if I helped.
Is the Reputation so important for all? In every post I see give rep if I help you..
Reply


Messages In This Thread
0kb compile 500lines script [HELP] - by wNNk - 18.01.2012, 16:26
Re: 0kb compile 500lines script [HELP] - by Kyle - 18.01.2012, 16:30
Re: 0kb compile 500lines script [HELP] - by Konstantinos - 18.01.2012, 16:34
Re: 0kb compile 500lines script [HELP] - by wNNk - 18.01.2012, 16:45
Re: 0kb compile 500lines script [HELP] - by Konstantinos - 18.01.2012, 16:47
Re: 0kb compile 500lines script [HELP] - by wNNk - 18.01.2012, 16:56
Re: 0kb compile 500lines script [HELP] - by Konstantinos - 18.01.2012, 16:58
Re: 0kb compile 500lines script [HELP] - by wNNk - 18.01.2012, 16:59
Re: 0kb compile 500lines script [HELP] - by wNNk - 18.01.2012, 17:32
Re: 0kb compile 500lines script [HELP] - by MP2 - 18.01.2012, 17:46

Forum Jump:


Users browsing this thread: 2 Guest(s)