Jump to content
  • 0

Bike fuel


Andrei-Madalin Hizan

Question

1 answer to this question

Recommended Posts

  • 0

Salut @Andrei-Madalin Hizan,

Rezolvarea e foarte simpla. Cauti scriptul care scade Fuel-ul de la vehicule si adaugi o exceptie, care arata in felul urmator:

if(!IsABike(GetPlayerVehicleID(playerid))) {
	//restul de cod pe care il ai
}

Daca esti pe un gamemode "de la 0", vei avea nevoie de functia IsABike, pe care o gasesti in aproape orice GM de pe net. Daca ai un gamemode descarcat de pe net, mai mult ca sigur deja ai functia respectiva.

Practic, traducerea in romana a exceptiei de mai sus e urmatoarea: Daca nu este o bicicleta vehiculul in care se afla jucatorul, atunci benzina scade.

Apropo, deoarece mai mult ca sigur scriptul prin care benzina scade e folosit intr-un timer, probabil va trebui sa detectezi jucatorul cu "i", sau in loc de GetPlayerVehicleID, poti folosi o variabila definita deja de tine in script, cum ar fi "vehicleid".

Cat despre modalitatea prin care sa nu-ti mai apara benzina la speedometru, procedezi tot cu acelasi script.

if(!IsABike(GetPlayerVehicleID(playerid))) PlayerTextDrawSetString //etc, restu de cod de la fuel

 

Daca te-am ajutat =>

spacer.png

Link to comment
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.

×
×
  • 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.