Jump to content

Cum sa Spawnezi masini cu X viata.


irinel1996

Recommended Posts

Salut, ma prezint, sunt irinel1996. Vad ca nu prea sunt multi scripteri pe aici, bunisori, sunt vreo 3-4. In fine. Aici va explic cum sa "spawnati" vehicule cu X viata, adica stricate si asa. E destul de util pentru RP...

-1º Creati un "new" la inceputul GM-ului. Ceva de genu:

new masinastricata1;
-2º Mergem la "OnGameModeInit" si punem vehiculul care vrem sa fie stricat...
AddStaticVehicle/Ex(......................................);
-3º Punem in fata la AddStaticVehicle/Ex "masinastricata1", ar ramane asa:
masinastricata1 = AddStaticVehicle/Ex(......................................);
-4º Se pune "cat de stricat vrei sa fie, adica viata, reparatiile". Punem 300, e destul, asa scoate fum motorul.
SetVehicleHealth(masinastricata1, 300);
-5º Si ar ramane asa ceva:
//===========

new masinastricata1; //Sus, la inceputul GM-ului.

//In OnGameModeInit
masinastricata1 = AddStaticVehicle/Ex(......................................);
SetVehicleHealth(masinastricata1, 300);

//============

Nu e cine stie ce, dar sper ca o sa va fie util.

Vreau sa ramana clar ca vehiculul caroseria o sa fie normala, adica reparata, doar ca motorul e stricat.

Working on:

-[FS]iTuning (With ALL components & Neons).

-[FS]iRadar (Advanced Speed Cameras).

Link to comment
Share on other sites

Mda, cea mai proasta metoda, ceva mai usor: (am facut-o pe loc)

stock CreateVehicleEx(modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay = -1, Float:health = 1000.0)
{
     new NewVehicle = CreateVehicle(modelid,x,y,z,angle,color1,color2,respawn_delay);
     SetVehicleHealth(NewVehicle, 300);
}

si folositi ca la orice vehicul, sub OnGameModeInit ...

Link to comment
Share on other sites

stuntman-=!!" post="50130" timestamp="1294854632"]

Mda, cea mai proasta metoda, ceva mai usor: (am facut-o pe loc)

stock CreateVehicleEx(modelid, Float:x, Float:y, Float:z, Float:angle, color1, color2, respawn_delay = -1, Float:health = 1000.0)
{
     new NewVehicle = CreateVehicle(modelid,x,y,z,angle,color1,color2,respawn_delay);
     SetVehicleHealth(NewVehicle, 300);
}

si folositi ca la orice vehicul, sub OnGameModeInit ...

Si nu tot aia e ma? ¬¬ Pt ce il bagi in "stock"?

Working on:

-[FS]iTuning (With ALL components & Neons).

-[FS]iRadar (Advanced Speed Cameras).

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
Reply to this topic...

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