Jump to content
  • 0
MarkoNFM

Vehicul avariat la job

Question

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 !

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

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.

Share this post


Link to post
Share on other sites
  • 0

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;
        }

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

This site uses cookies. By continuing browsing, you agree to the use of this information. For more details, see Terms of Use and Privacy Policy.