UnattachObject -
Trooper[Y] - 08.09.2009
Ive seen that after i attached a player an object,
i cant unattach it with "SetPlayerObject".
How can i unattach it other way ?
P.S.: Destroying Object doesnt work, bcause i cannot create an object out of OnGameModeInit
Re: UnattachObject -
Frankylez - 08.09.2009
If it is a playerobject then do DestroyPlayerObject, otherwise DestroyObject.
But there was something changed in 0.3 with the object stuff, read the beta release topic.
Re: UnattachObject -
Trooper[Y] - 08.09.2009
Where to find it ?
btw. i told, destroying doesnt works....
Re: UnattachObject -
saiberfun - 08.09.2009
Quote:
Originally Posted by Trooper[Y
]
Where to find it ?
btw. i told, destroying doesnt works....
|
destroying works
make a function for it that gets the object post n saves it to some variables,
the it destroys it n creates it back with the positions saved
Re: UnattachObject -
eakwarp - 08.09.2009
attach in car not work...
Re: UnattachObject -
Trooper[Y] - 08.09.2009
im not talking about attaching to a vehicle.
Destroying doesnt worked, as far i cant create a new object.
It just doesnt appear again !
Re: UnattachObject -
saiberfun - 08.09.2009
Quote:
Originally Posted by Trooper[Y
]
im not talking about attaching to a vehicle.
Destroying doesnt worked, as far i cant create a new object.
It just doesnt appear again !
|
maybe show the script?
erm n i just saw that u said
Quote:
Originally Posted by Trooper[Y
]
P.S.: Destroying Object doesnt work, bcause i cannot create an object out of OnGameModeInit
|
what do u mean by that?
Re: UnattachObject -
Trooper[Y] - 08.09.2009
If i use "CreateObject" at another point than OnGameModeInit,
nothing happens....
U dont need an script....
I mean, its just a theoretical question, like "how to do it".
Would be enough if you show me an example.
btw. saw in
http://forum.sa-mp.com/index.php?topic=119943.0 the reason it didnt worked :
Can anybody tell me, how to do this ?
Re: UnattachObject -
saiberfun - 08.09.2009
Quote:
Originally Posted by Trooper[Y
]
If i use "CreateObject" at another point than OnGameModeInit,
nothing happens....
U dont need an script....
I mean, its just a theoretical question, like "how to do it".
Would be enough if you show me an example.
btw. saw in http://forum.sa-mp.com/index.php?topic=119943.0 the reason it didnt worked :
Can anybody tell me, how to do this ?
|
oh didnt see that there a new difference to attaching too X_X
duh this streamin streamout is getting kinda annoying lol

bbut usefull i guess..
only that there are sum functions that need to be changed is kinda annoying n confusing.
Re: UnattachObject -
Trooper[Y] - 08.09.2009
So what do i have to do to unattach it ?!
Re: UnattachObject -
kaisersouse - 08.09.2009
Worry more about creating it correctly. I create around 15,000 objects outside of ongamemodeinit with no issue. They all have the correct IDs and I can destroy/recreate them all day long. The fact you can't use CreateObject outside of ongamemodeinit leads me to believe you have bigger issues to worry about.
Once you figure that out, create them with an id and destroy them using that id.
Re: UnattachObject -
Trooper[Y] - 08.09.2009
I tried creating an object and attaching them directly.
The Player didnt got attached anything !
Re: UnattachObject -
saiberfun - 08.09.2009
Quote:
Originally Posted by Trooper[Y
]
I tried creating an object and attaching them directly.
The Player didnt got attached anything !
|
lol
u need to attach it on ONPlayerStreamIN
i guess but i dunno exactly.
im wondering how to exactly do it too^^
Re: UnattachObject -
saiberfun - 09.09.2009
Quote:
Originally Posted by SaiBerFun
Quote:
Originally Posted by Trooper[Y
]
I tried creating an object and attaching them directly.
The Player didnt got attached anything !
|
lol
u need to attach it on ONPlayerStreamIN
i guess but i dunno exactly.
im wondering how to exactly do it too^^
|
i kno now u need to apply it there
like
public OnPlayerStreamIn(playerid, forplayerid)
{
AttachObjectToPlayer(objectid,forplayerid,offX,off Y,offz,iX,iY,iZ);
return 1;
}
then u need a vraiable to check if the forplayer got an object attached