SA-MP Forums Archive
Gate Problem - 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: Gate Problem (/showthread.php?tid=376958)



Gate Problem - Akcent_Voltaj - 12.09.2012

my gate wont get up if i /opengate.

PHP код:
pd CreateDynamicObject(968,1544.69921875,-1623.89941406,13.19999981,0.40100098,90.00000000,270.81848145); //object(barrierturn)(2) 
PHP код:
            else if(PlayerToPoint(10playerid,1543.3916,-1627.9576,13.3828) || PlayerToPoint(10playerid,1549.4288,-1628.2776,13.3828))
                        {
                            
MoveDynamicObject(pd1544.69921875,-1623.89941406,13.199999813.0);
                            
SetTimer("pdclose",5000false);
                            return 
1;
                        }
                    } 
forward pdclose();
PHP код:
                    public pdclose()
                    {
                    
MoveDynamicObject(pd1544.69921875,-1623.89941406,13.199999813.0);
                    return 
1;
                    } 



Re: Gate Problem - Jeffry - 12.09.2012

Well, how should it move up if all your Z Var's are 13.19999.
You have to change the MoveDynamicObject in your command to the position where you want it to move to, for example:

pawn Код:
else if(PlayerToPoint(10, playerid,1543.3916,-1627.9576,13.3828) || PlayerToPoint(10, playerid,1549.4288,-1628.2776,13.3828))
                        {
                            MoveDynamicObject(pd, 1544.69921875,-1623.89941406,18.19999981, 3.0); //18.199 instead of 13.199  will move the gate 5 up.
                            SetTimer("pdclose",5000, false);
                            return 1;
                        }
                    }



Re: Gate Problem - Akcent_Voltaj - 12.09.2012

Quote:
Originally Posted by Jeffry
Посмотреть сообщение
Well, how should it move up if all your Z Var's are 13.19999.
You have to change the MoveDynamicObject in your command to the position where you want it to move to, for example:

pawn Код:
else if(PlayerToPoint(10, playerid,1543.3916,-1627.9576,13.3828) || PlayerToPoint(10, playerid,1549.4288,-1628.2776,13.3828))
                        {
                            MoveDynamicObject(pd, 1544.69921875,-1623.89941406,18.19999981, 3.0); //18.199 instead of 13.199  will move the gate 5 up.
                            SetTimer("pdclose",5000, false);
                            return 1;
                        }
                    }
no no

it the gate is like this: ____
and it needs to open like this : |


Re: Gate Problem - Jeffry - 12.09.2012

Like this:


(My paint skills are not the very best ones^^).


Re: Gate Problem - Akcent_Voltaj - 12.09.2012

yes like that ..


Respuesta: Gate Problem - Siralos - 12.09.2012

You have three move parameters in MoveDynamicObject...
RotX, RotY and RotZ

You should do:

pawn Код:
Open:
MoveDynamicObject(pd, 1544.69921875,-1623.89941406,13.21999981,3.0,0.40100098,90.00000000,360.0);
Close:
MoveDynamicObject(pd, 1544.69921875,-1623.89941406,13.20999981,3.0,0.40100098,90.00000000,270.818);



Re: Gate Problem - Akcent_Voltaj - 12.09.2012

it still doesent open like Jettry's picture..


Re: Gate Problem - Akcent_Voltaj - 12.09.2012

anyone know??


Re: Gate Problem - clarencecuzz - 12.09.2012

Use MTA and get the coordinates for the
Open gate, then just paste them into your
MoveDynamicObject function.


Re: Gate Problem - Akcent_Voltaj - 12.09.2012

i did and no work then it will open just like Siralos coords..