SA-MP Forums Archive
Help with moving gates - 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: Help with moving gates (/showthread.php?tid=368558)



Help with moving gates - GGRP - 13.08.2012

Okay so i am having problems with my gates so its the Gates outside the PD there is 2 of them sitting next to them that look like this -- so when they lift up they rotate around while lifting and they both sit like this | | I just want the to go straight up without turning but can't seem to get it, i can let you log on and have a look. and use TV to show you the whole Script as the reception one is wrong too but i will post that one when this one is fixed.


PHP код:
                {
                        if(
Flspdgatestate == 0)
                        {
                            new 
string[128];
                            
format(string,sizeof(string), "* %s uses %s remote to open the gates of the LSPD."PlayerNameEx(playerid), HisHer(playerid));
                                
MoveDynamicObject(flspdgate[0], 1545.00, -1626.201978.437.0);
                            
MoveDynamicObject(flspdgate[1], 1545.00, -1631.6619878.437.0);
                            
SetTimer("GateCloseflspdgate"70000);
                            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                            
Flspdgatestate 1;
                            return 
1;
                        }
                        else
                        {
                            new 
string[128];
                            
format(string,sizeof(string), "* %s uses %s remote to close the gates of the LSPD."PlayerNameEx(playerid), HisHer(playerid));
                            
MoveDynamicObject(flspdgate[0], 1545.00, -1626.2013.437.0);
                            
MoveDynamicObject(flspdgate[1], 1545.00, -1631.6613.437.0);
                            
ProxDetector(30.0playeridstringCOLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                            
Flspdgatestate 0;
                            return 
1



Re: Help with moving gates - GGRP - 13.08.2012

bump


Re: Help with moving gates - telmo_ferreira - 13.08.2012

show me the flspdgate[0]=CreateObject and flspdgate[1]=CreateObject


Re: Help with moving gates - GGRP - 16.08.2012

This is the other part of the script.

PHP код:
}*/
//----------------[Gate Closings]------------------------
public GateCloselspdgate()
{
    
//FuncLog("GateCloselspdgate");
    
SetDynamicObjectPos(lspdgate,1588.5617, -1638.087112.7200);
    
Lspdgatestate 0;
    return 
1;
}
public 
GateCloseflspdgate()
{
    
//FuncLog("GateCloseflspdgate");
    
MoveDynamicObject(flspdgate[0], 1545.00, -1626.2013.437.0);
    
MoveDynamicObject(flspdgate[1], 1545.00, -1631.6613.437.0);
    
Flspdgatestate 0;
    return 
1



Re: Help with moving gates - Naruto_Emilio - 16.08.2012

Dude, this is the right form for movedynamicobject

pawn Код:
MoveDynamicObject(yourgate, x, y, z, 0.0, 0.0, 0.0, speed); // the rotation should be 0.0 to make the gate not changing rotations...