Jump to content
  • 0

pomoc Pripevnenie Objektov Na Auto + Prikaz


mawerick

Dotaz

Ahoj potrebujem poradit.

 

Urobil som si objekty na auto a chcem ich nan pripevnit. Chcel by som to mat cez prikaz ze napisem nejaky prikaz a spawne sa mi auto a na nom uz budu aj objekty. SKusal som to ale spawnovalo sa my len auto.

 

Tu su objekty na aute

 

// sultan:
new myobject = CreateObject(19121,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(myobject, GetPlayerVehicleID(playerid), 0.450000,0.000000,1.275000,0.000000,0.000000,0.000000);
// sultan:
new myobject = CreateObject(19121,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(myobject, GetPlayerVehicleID(playerid), -0.449999,0.000000,1.275000,0.000000,0.000000,0.000000);
// sultan:
new myobject = CreateObject(3472,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(myobject, GetPlayerVehicleID(playerid), 0.000000,0.000000,1.079999,0.000000,0.000000,0.000000);

 

a tu je kod vytvoreneho auta

AddStaticVehicle(560,-1295.8989,-85.8157,13.8534,57.7298,37,0); //

 

Prosim poradte.

Link to comment
Share on other sites

4 odpovědí na tuto otázku

Recommended Posts

  • 0

tak uděláš příkaz a do něj dáš:

 

new myobject[3];
new auto = CreateVehicle(560,-1295.8989,-85.8157,13.8534,57.7298,37,0,120); // cislo 120 uvádí cas respavnutí vozidla. Pokud dáš -1, tak se znovu nerespawne.
myobject[0] = CreateObject(19121, 0.0, 0.0, -1000, 0.0, 0.0, 0.0, 100);
myobject[1] = CreateObject(19121, 0.0, 0.0, -1000, 0.0, 0.0, 0.0, 100);
myobject[2] = CreateObject(3472, 0.0, 0.0, -1000, 0.0, 0.0, 0.0, 100);
AttachObjectToVehicle(myobject[0], auto, 0.450000,0.000000,1.275000,0.000000,0.000000,0.000000);
AttachObjectToVehicle(myobject[1], auto,-0.449999,0.000000,1.275000,0.000000,0.000000,0.000000);
AttachObjectToVehicle(myobject[2], auto, 0.000000,0.000000,1.079999,0.000000,0.000000,0.000000);

 

Netestoval jsem to, tak nevím jak to pojede, ale mělo by to jet.

  • Líbí se mi to! (+1) 1
Link to comment
Share on other sites

  • 0

Funguje ďakujem veľmi pekne

 

Rep. 1+

 

Jeste se chci zeptat

 

public OnPlayerCommandText(playerid, cmdtext[])
{
   if (strcmp("/play radio", cmdtext, true) == 0)
   {
    PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls");
    return 1;
   }
   if (strcmp("/radio in my pos", cmdtext, true) == 0)
   {
    new Float:X, Float:Y, Float:Z, Float:Distance = 5.0;
    GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls", X, Y, Z, Distance, 1);
return 1;
   }
   return 0;
}

 

tohle je ze sa-mp.com wiki.

 

Chci se zeptat jestli tam musim jeste neco pripsat nejakou pozici tim myslim do tech XYZ jestli chci ay to bylo slyset na tom miste kde to pustim.

Edited by mawerick
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...