Jump to content
  • 0

Question

Posted

Salut !

Am si eu o problema , am incercat sa fac un job in care atunci cand tastazi comanda /work sa-ti dea vehiculul avariat de exemplu (damage la vehicul 390) si am incercat
new veh = GetPlayerVehicleID(playerid);
            SetVehicleHealth(veh, 380.0);

si totusi nu mi-o spawneaza cu avarie, help please !

3 answers to this question

Recommended Posts

  • 0
Posted

Pai. Tu creezi vehiculul cu o functie.

De exemplu: MasinaJob[playerid] = CreateVehicle(....);

SetVehicleHealth(MasinaJob[playerid], 380.0);

PutPlayerInVehicle(playerid, MasinaJob[playerid], 0);

Cam asa ar trebui sa arate functia ta.

  • 0
Posted

Eu aici vreau sa o fac ca systemul de jobvehicle este direct cu baza de date tin sa precizez este GM burned

 

case 14:
        {
            if(PlayerInfo[playerid][pWantedLevel] != 0) return SCM(playerid, -1, "Nu poti munci la acest job deoarece ai wanted!");
            if(!PlayerToPoint(10.0, playerid,  -2123.75684, -222.11610, 34.31469))
            {
                SendClientMessage(playerid, COLOR_GREY, "Nu esti la locul unde poti incepe munca. Ti-am pus un checkpoint, du-te la el!");
                SetPlayerCheckpointEx(playerid,  -2123.75684, -222.11610, 34.31469, 10.0);
                CP[playerid] = 53;
                return 1;
            }
            if(PlayerInfo[playerid][pCarLic] == 0) return SCM(playerid, COLOR_LGREEN, "Eroare: Ai nevoie de o licenta de condus pentru a putea munci la acest job!");
            new rand = random(3);
            if(rand == 1) SetPlayerCheckpointEx(playerid, 830.0479, -611.8955, 16.3432, 5.0);
            else if(rand == 2) SetPlayerCheckpointEx(playerid, 820.7677, -612.4786, 16.3432, 5.0);
            else if(rand == 3) SetPlayerCheckpointEx(playerid, 790.9538, -612.2801, 16.3432, 5.0);
            else SetPlayerCheckpointEx(playerid, 830.0479, -611.8955, 16.3432, 5.0);
            CP[playerid] = 172;
            PlayerTextDrawSetString(playerid, InfosTD, string);
            SetTimerEx("HideTextdraw", 8000, 0, "%d", playerid);
            PlayerTextDrawShow(playerid, InfosTD);
            CarAngle = 319.1513;
            StartingWork[playerid] = 0;
            CurseFacute[playerid] = 0;
            MoneyEarned[playerid] = 0;
        }

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.