Moving Gate Bar object - 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: Moving Gate Bar object (
/showthread.php?tid=310545)
Moving Gate Bar object -
-CaRRoT - 12.01.2012
Well , Everyone knows the Gate bar object which it's ID = 968 that most of the people use For LSPD first gate , anyway...I Want to make it's moving speed, so i will have to make it with MoveDynamicObject , but MoveDynamicObject doesn't Support RX RY RZ , only X Y Z speed , so i did that :
PHP код:
if(strcmp(cmdtext,"/ddogate", true) == 0)
{
//MoveDynamicObject(DDEPOT,1895.0921630859, -1879.7592773438, 13.479251861572,2); //object(phils_compnd_gate) (2)
SetDynamicObjectRot( DDEPOT, 0.0000, 0.0000, 0.0000);
SendClientMessage(playerid, COLOR_WHITE, "Drug Depot Gate has Been opened.");
return 1;
}
if(strcmp(cmdtext,"/ddcgate", true) == 0)
{
//MoveDynamicObject(DDEPOT,1895.0921630859, -1879.7592773438, 13.479251861572,2); //object(phils_compnd_gate) (2)
SetDynamicObjectRot( DDEPOT, 0.0000, 90.0000, 0.0000);
SendClientMessage(playerid, COLOR_WHITE, "Drug Depot Gate has Been Closed.");
return 1;
}
when i added it with ONLY SetDynamicObjectRot without MoveDynamicObject - it worked , But the Object just go up in a second , like it get Tp'ed there.. lol , Anyway - is there a way to make it go up slowly ?
Re: Moving Gate Bar object -
mineralo - 12.01.2012
I'm not sure but I think the speed is here //MoveDynamicObject(DDEPOT,1895.0921630859, -1879.7592773438, 13.479251861572,>>>2<<<); just put less like 1.2
Re: Moving Gate Bar object -
-CaRRoT - 12.01.2012
Dude.. I know this - but when i do this the object stay at it's place cause when i Map it closed or opened on mta it just change the RotY - But MoveDynamicObject don't change the Rot..