new pdoor1; new pdoor2; new pdoor3; new pdoor4; new edoor5; new edoor6; |
pdoor1 = CreateDynamicObject(1495, 1808.76, -1547.63, 5699.42, 0.00, 0.00, 0.00); pdoor2 = CreateDynamicObject(1495, 1811.76, -1547.61, 5699.42, 0.00, 0.00, 180.00); pdoor3 = CreateDynamicObject(1495, 1811.74, -1545.83, 5699.42, 0.00, 0.00, 180.00); pdoor4 = CreateDynamicObject(1495, 1808.73, -1545.87, 5699.42, 0.00, 0.00, 0.00); edoor5 = CreateDynamicObject(1495, 1797.01, -1525.15, 5699.42, 0.00, 0.00, 180.00); edoor6 = CreateDynamicObject(1495, 1794.01, -1525.19, 5699.42, 0.00, 0.00, 360.00); |
CMD:dooropen(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 5 && !PlayerInfo[playerid][pFacMod]) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); if(!IsACop(playerid) && !IsAGov(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an LSFD Oficer."); if(PlayerToPoint(2.0,playerid,1812.0830,-1545.2319,5700.4287)) { MoveDynamicObject(pdoor3,1811.73828125+1,-1545.82873535,5699.42480469,0.50); MoveDynamicObject(pdoor4,1808.73071289-1,-1545.87463379,5699.42480469,0.50); return 1; } else if(PlayerToPoint(2.0,playerid,1797.00830078,-1525.15258789,5699.42480469) || PlayerToPoint(2.0,playerid,1793.6631,-1523.9191,5700.4287)) { MoveDynamicObject(edoor5,1797.00830078+1,-1525.15258789,5699.42480469,0.50); MoveDynamicObject(edoor6,1794.00976562-1,-1525.18676758,5699.42480469,0.50); return 1; } else if(PlayerToPoint(2.0,playerid,1812.0830,-1545.2319,5700.4287) || PlayerToPoint(2.0,playerid,1810.3752,-1548.3003,5700.4287)) { MoveDynamicObject(pdoor1,1808.76147461-1,-1547.63208008,5699.42480469,0.50); MoveDynamicObject(pdoor2,1811.76184082+1,-1547.60510254,5699.42480469,0.50); return 1; } else SendClientMessage(playerid, 0xAA3333AA, "[Error]: {FFFFFF} You are not around a control pad!"); return 1; } |
CMD:doorclose(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 5 && !PlayerInfo[playerid][pFacMod]) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); if(!IsACop(playerid) && !IsAGov(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an LSFD Oficer."); if(PlayerToPoint(2.0,playerid,1812.0830,-1545.2319,5700.4287)) { MoveDynamicObject(pdoor3,1811.73828125,-1545.82873535,5699.42480469,0.50); MoveDynamicObject(pdoor4,1808.73071289,-1545.87463379,5699.42480469,0.50); return 1; } else if(PlayerToPoint(2.0,playerid,1797.00830078,-1525.15258789,5699.42480469) || PlayerToPoint(2.0,playerid,1793.6631,-1523.9191,5700.4287)) { MoveDynamicObject(edoor5,1797.00830078,-1525.15258789,5699.42480469,0.50); MoveDynamicObject(edoor6,1794.00976562,-1525.18676758,5699.42480469,0.50); return 1; } else if(PlayerToPoint(2.0,playerid,1812.0830,-1545.2319,5700.4287) || PlayerToPoint(2.0,playerid,1810.3752,-1548.3003,5700.4287)) { MoveDynamicObject(pdoor1,1808.76147461,-1547.63208008,5699.42480469,0.50); MoveDynamicObject(pdoor2,1811.76184082,-1547.60510254,5699.42480469,0.50); return 1; } else SendClientMessage(playerid, 0xAA3333AA, "[Error]: {FFFFFF} You are not around a control pad!"); return 1; } |
I used to have similar problem as this one. The way I fixed it was that I used normal CreateObject for moving objects and not the streamer.
|