Jump to content

Question

Posted (edited)

Salut!

As dori sa ma ajutati cu un script. Ca la fiecare job la care este spawnat un vehicul de catre un jucator doar jucatorul care a spawnat vehiculul sa poata intra in el, pentru restul jucatorilor sa fie vehiculul blocat, ca exemplu va dau jobul Farmer de pe Bugged. Am incercat sa fac ceva cu "SetVehicleParamsForPlayer" dar din pacate nu am reusit.

 

Multumesc!

Edited by euionut
Lipsa

6 answers to this question

Recommended Posts

  • 0
Posted

In primul rand nu se cer scripturi.

2. Incearca sa faci ca atunci cand se urca in tractor de exemplu sa o blocheze, trebuie sa adaugi o variabila noua la joburi de care te ajuti sa o blochezi

3. Incearca sa faci iar daca intampini problema posteaza aici

giphy.gif

  • 0
Posted

Sunt pe tableta te ajut cum pot uite un inceput:

Te duci unde ai pAdmin, pHelper etc. Si adaugi pJobLock, dupaia te duci la o comanda gen /lock(cea cu care inchizi masina personala) si te folosesti de acolo doar ca in loc de variabilele de acolo pui pJobLock duapai te duci la jobul respectiv iarmdupa ce playerul se urca in tractor adaugi functia de a inchide masina, sper ca m-am facut inteles cat de cat

giphy.gif

  • 0
Posted (edited)

Uite... Am incercat urmatorul script si nu functioneaza X_X

for(new i=0; i < MAX_PLAYERS; i++)
{
     if(i == playerid) continue;
     SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i,0,1);
}
Edited by euionut
Edit
  • 0
Posted

Denumeste masina.

Exemplu:

new CarTruck[MAX_VEHICLES];

CarTruck[playerid] = AddStaticVehicleEx (modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:angle, color1, color2, respawn_delay, addsiren=0)

SetVehicleParamsEx(CarTruck[playerid], 1, 0, 0, 1, 0, 0, 0);

Functie:

SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective)

(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective)
vehicleid The ID of the vehicle to set the parameters of.
engine Engine status. 0 - Off, 1 - On.
lights Light status. 0 - Off, 1 - On.
alarm Vehicle alarm status. If on, the alarm starts. 0 - Off, 1 - On.
doors Door lock status. 0 - Unlocked, 1 - Locked.
bonnet Bonnet (hood) status. 0 - Closed, 1 - Open.
boot Boot/trunk status. 0 - Closed, 1 - Open.
objective Toggle the objective arrow above the vehicle. 0 - Off, 1 - On.
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.