Help with moving gates
#1

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
Reply
#2

Bump.
Reply
#3

Instead:

pawn Код:
MoveDynamicObject(flspdgate[0], ...
Put:

pawn Код:
MoveObject(flspdgate[0], ...
And Change

pawn Код:
CreateDynamicObject ...
to

pawn Код:
CreateObject ...
I think that the "rotation" happens because the Dynamic function doesn't read the Angle of the object (im noob at the scripting terms...)
Reply
#4

pawn Код:
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.20, 1978.43,0.0,0.0,0.0,7.0);
                            MoveDynamicObject(flspdgate[1], 1545.00, -1631.66, 19878.43, 0.0,0.0,0.0,7.0);
                            SetTimer("GateCloseflspdgate", 7000, 0);
                            ProxDetector(30.0, playerid, string, COLOR_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.20, 13.43, 0.0,0.0,0.0,7.0);
                            MoveDynamicObject(flspdgate[1], 1545.00, -1631.66, 13.43, 0.0,0.0,0.0,7.0);;
                            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                            Flspdgatestate = 0;
                            return 1;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)