Jump to content
  • 0

Problema destroy trailer


Question

Posted

Problema intalnita (descriere):Cum as putea face ca atunci cand un tir tracteaza un trailer si tir-ul explodeaza sa dispara automat trailer-ul.
Ero(area / rile) / warning-(ul / urile):
Liniile de cod / sursa / script-ul:

Am pus la OnPlayerStateChange cat si la OnPlayerDeath asa:

 

  1. if(Truck1[playerid] == 1)
  2. {
  3.        DestroyVehicle(GetVehicleTrailer(GetPlayerVehicleID(playerid)));
  4. DisablePlayerCheckpoint(playerid);
  5. Truck1[playerid] = 0;
  6. KillTimer(timert[playerid]);
  7. }

CheckPoint-ul imi dispare, cat si truck1 se seteaza pe 0, deci ceva nu e bine ceva la destroyvehicle, precizez ca trailerul se creeaza cand incepi misiunea.

 

Imagini / Video (optional):
Ati incercat sa rezolvati singur?:da

10 answers to this question

Recommended Posts

  • 0
Posted

La OnVehicleDeath pune doar SetVehicleToRespawn(GetVehicleTrailer(vehicleid))

  • Upvote 1

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

  • 0
Posted

Practic odata ce-a explodat...nu prea mai exista masina si nu poti verifica acel trailer. Fa-l sa dispara cand viata camionului a scazut sub 100 sau cand a luat foc. Nu stiu exact de la cat incepe sa scoata flacari pe nas :))

server.php

  • 0
Posted (edited)

da, ai dreptate, dar mai am o problema, cum fac ca atunci cand pierde remorca dupa 60 sec daca nu o ataseaza inapo sa piarda misiunea si remorca sa primeasca destroy ?

Edited by Tikitaka
  • 0
Posted (edited)

Verfici daca tirul are atasat trailerul daca da misiunea continua daca nu faci un timer care la terminare distruge remorca..

Edited by Neculai
  • 0
Posted

La OnVehicleDeath pui:

if(GetVehicleTrailer(vehicleid) != 0) 
{
     SetVehicleToRespawn(GetVehicleTrailer(vehicleid))
}

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Guest
This topic is now closed to further replies.
×
×
  • 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.