Posts: 1,147
Threads: 109
Joined: Jul 2013
Reputation:
0
Does anyone know what the best way of adding Gates etc... etc....
As far as I know you have to do CreateObject.
Any tips? A
And, what is the GATE ID?
Posts: 1,147
Threads: 109
Joined: Jul 2013
Reputation:
0
mmm, appreciated bro, I guess I can live with it.
I will reply if I get stuck somewhere.
Thank you.
Posts: 1,147
Threads: 109
Joined: Jul 2013
Reputation:
0
Sorry for the Triple post, but, I don't know what's wrong with the code in my previous post.
Could anyone explain me how to work with Dynamic objects... or is it just the same as CreateObject?
Posts: 1,266
Threads: 6
Joined: Oct 2014
PHP код:
CreateDynamicObject(modelid, x, y, z, rx, ry, rz);
=
PHP код:
new mygate;
public OnFilterScriptInit()
{
mygate = CreateDynamicObject(2933,1207.5870,-1325.7070,13.3984,180.4690, 0, 0);
return 1;
}
CMD:movegate(playerid,params[])
{
MoveDynamicObject(mygate,X,Y,Z,Speed,RX,RY,RZ);
return 1;
}
Posts: 1,147
Threads: 109
Joined: Jul 2013
Reputation:
0
I don't know why but I don't have OnFilterScriptInit.... Did you create that?
Where should I create that callback
Posts: 1,266
Threads: 6
Joined: Oct 2014
Quote:
Originally Posted by saffierr
I don't know why but I don't have OnFilterScriptInit.... Did you create that?
Where should I create that callback
|
you can also put the CreateDynamicObject after:
public OnGameModeInit()
{
Posts: 1,147
Threads: 109
Joined: Jul 2013
Reputation:
0
I don't know which co-ordinates I have to fill in in RX/RY/RZ...
Posts: 1,266
Threads: 6
Joined: Oct 2014
Quote:
Originally Posted by saffierr
I don't know which co-ordinates I have to fill in in RX/RY/RZ...
|
RX RY RZ mean the rotation

you can put the rotation of your gate which you made it:
CreateDynamicObject(2933,1207.5870,-1325.7070,13.3984,
180.4690, 0, 0);
PHP код:
RX: 180.4690 RY: 0 RZ: 0
Код:
MoveDynamicObject(mygate,X,Y,Z,Speed,180.4690,0,0);