Jump to content

atasare obiect


Kasper

Recommended Posts

Salut! stie cineva cum se ataseaza un obiect de un vehicul? de exemplu eu vreau sa atasez remorca cu id 611 de un infernus prin comanda /atasare, am incercat toate posibilitatile, ex:

CMD:atasare(playerid, params[])
{
   new trailerid = AddStaticVehicle(611,-2236.2903,-2246.4932,29.9406,355.8985,0,0);
   AttachTrailerToVehicle(trailerid, GetPlayerVehicleID(playerid));
   return 1;
}

help me!

Link to comment
Share on other sites

Acum 4 ore, MegaZ775 a spus:

Mai precis unde e problema ca sunt mai multe posibilitati adica in incercarile tale nu se spameaza remorca sau nu se ataseaza?

pai cand scriu comanda /atasare, asta cand sunt intr-un vehicul nu se ataseaza, se spawneaza remorca la coordonatele alea.

Link to comment
Share on other sites

salut, incearca asa:


CMD:atasare(playerid, params[])
{
   new trailerid = AddStaticVehicle(611,-2236.2903,-2246.4932,29.9406,355.8985,0,0);
   SetTimerEx("Atasare",1000,false,"du",trailerid,playerid);
   return 1;
}
forward Atasare(trailerid,playerid);
public Atasare(trailerid,playerid)
return AttachTrailerToVehicle(trailerid, GetPlayerVehicleID(playerid));

Functia de atasare nu permite sa folosesti in acelasi timp si crearea si atasarea vehiculului, deci trebuie sa pui un timer intre functia de creare a masinii si cea de atasare

  • Upvote 1

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
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.