SA-MP Forums Archive
Some gate help :D - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Some gate help :D (/showthread.php?tid=308848)



Some gate help :D - Anthony_X - 05.01.2012

Eyo,
im trying to create the orange gate open and close with command, hmm i know how to create the huge gate open and close but when i toke cords for orange gate i got same positions + ,0 ,270, 0
Hmm i didnt know how to do that i tryed to find some tutirial but i didnt found so please try help me, i can copy the pos of gate and location if that help.
+ rep for helpers
Anthony


Re: Some gate help :D - CmZxC - 05.01.2012

Is it a dynamic object ( gate ) or a normal object?
You have to use MoveObject or MoveDynamicObject.


Re: Some gate help :D - Anthony_X - 05.01.2012

MoveObject but im not sure that need be to orange gate, cuz i toke my other filterscript of gate there is the Huge Gate ..
and i trying to make it there, i copied the filter script


Re: Some gate help :D - CmZxC - 05.01.2012

How do you want the gates to move?
And i believe the 0, 270, 0 is the rotation.
Orange gate - do you mean the small blockage?
|----------------------------- ?
If yes, you have to use SetObjectRot.


Re: Some gate help :D - Anthony_X - 05.01.2012

ye the small one ID 968 , Hmm how to do that can you explain me please ?


Re: Some gate help :D - CmZxC - 05.01.2012

Do SetObjectRot(gateid, rotX, rotY, rotZ);
Easy as that.
Open :
SetObjectRot(gateid, 0,0,90);
Close :
SetObjectRot(gateid, 0, 90 , 0);

Easy as that


Re: Some gate help :D - Anthony_X - 05.01.2012

Can you show me an example, im didnt understand where to add it


Re: Some gate help :D - CmZxC - 05.01.2012

pawn Код:
if(strcmp(cmdtext, "/gateopen", true) == 0)
{
    blablabla...
    SetObjectRot(gate, 0, 0, 90)
}
if(strcmp(cmdtext, "/gateclose", true) == 0)
{
    blablabla...
    SetObjectRot(gate, 0, 90, 90);
}



Re: Some gate help :D - Anthony_X - 05.01.2012

mate im didnt understand where to put it in the script.. can you help ?


Re: Some gate help :D - CmZxC - 05.01.2012

edited my last post, sorry i accidently pressed post.