Jump to content

AttachObjectToVehicle


star69

Recommended Posts

Problema intalnita (descriere): Nu pot atasa niciun object la un vehicul
Ero(area / rile) / warning-(ul / urile): Nu sunt
Liniile de cod / sursa / script-ul(obligatoriu):

COMMAND:masina(playerid, cmdtext[])
{
	new vehicleid = GetPlayerVehicleID(playerid);
	AttachObjectToVehicle(1609, vehicleid, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0);
	return 1;
}


Imagini / Video (optional):
Ati incercat sa rezolvati singur?: Da, in server_log nu apare nimic, am si crashdetect in server, nu spune nimic

Link to comment
Share on other sites

Pentru a atașa un obiect de vehicul trebuie să creezi prima dată obiectul cu CreateObject sau CreateDynamicObject și după să atașezi obiectul creat de mașină. Era bine să te uiți și pe wikipedia puțin înainte de a face comanda, așa trebuie atașat un obiect de mașină:

new objectid = CreateObject(...);
new vehicleid = GetPlayerVehicleID(playerid);
AttachObjectToVehicle(objectid, vehicleid, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0);

Gh38gEQ.gif

Link to comment
Share on other sites

2 hours ago, ImpulsE said:

Pentru a atașa un obiect de vehicul trebuie să creezi prima dată obiectul cu CreateObject sau CreateDynamicObject și după să atașezi obiectul creat de mașină. Era bine să te uiți și pe wikipedia puțin înainte de a face comanda, așa trebuie atașat un obiect de mașină:


new objectid = CreateObject(...);
new vehicleid = GetPlayerVehicleID(playerid);
AttachObjectToVehicle(objectid, vehicleid, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0);

nu merge, am incercat inainte

Link to comment
Share on other sites

COMMAND:masina(playerid, cmdtext[])
{
    new vehicleid = GetPlayerVehicleID(playerid);
    new testoasa = CreateObject(1609, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(testoasa, vehicleid, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0);
    return 1;
}
 

Link to comment
Share on other sites

4 minutes ago, star69 said:

COMMAND:masina(playerid, cmdtext[])
{
    new vehicleid = GetPlayerVehicleID(playerid);
    new testoasa = CreateObject(1609, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(testoasa, vehicleid, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0);
    return 1;
}
 

Ce procesor de comenzi folosesti? Deoarece mie imi merge comanda, daca folosesti ZCMD sau PAWN.cmd atunci ar trebui modifici comanda ca dupa ":" sa arate asa: masina(playerid, params[])

Gh38gEQ.gif

Link to comment
Share on other sites

zcmd.

Lucrez de ceva timp la un server.

Acum 2-3 saptamani imi mergea comanda. Am  mai lucrat la server, am bagat mai multe sisteme, am luat si de pe net niste sisteme.. si acum nu imi mai merge.

Nu stiu ce blocheaza, la player functioneaza SetPlayerAttachedObject.

COMMAND:omulet(playerid, cmdtext[])
{
	SetPlayerAttachedObject(playerid, 3, 1609, 2);
	return 1;
}

 

Link to comment
Share on other sites

26 minutes ago, star69 said:

zcmd.

Lucrez de ceva timp la un server.

Acum 2-3 saptamani imi mergea comanda. Am  mai lucrat la server, am bagat mai multe sisteme, am luat si de pe net niste sisteme.. si acum nu imi mai merge.

Nu stiu ce blocheaza, la player functioneaza SetPlayerAttachedObject.


COMMAND:omulet(playerid, cmdtext[])
{
	SetPlayerAttachedObject(playerid, 3, 1609, 2);
	return 1;
}

 

Daca folosesti prea multe obiecte, adica depasesti limita de 1000, nu se va vedea obiectul, 

Ai doua variante, ori creezi obiectul dynamic si folosesti attachdynamicobject

Or creezi obiectul la inceputul lui ongamemodeinit si apoi il atasezi cand vrei

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.