SA-MP Forums Archive
How to make a moving gate - 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: How to make a moving gate (/showthread.php?tid=586741)



How to make a moving gate - ahameed4755 - 24.08.2015

im making a map and its half done but i wanna make a moveable gate how to make it? im using this map editor : https://sampforum.blast.hk/showthread.php?tid=282801


Re: How to make a moving gate - toxicape - 24.08.2015

Why you don't make the gate IG? Moveable only IG or in the script. I believe there is no chance to make moving with map editor.


Re: How to make a moving gate - Logofero - 24.08.2015

Quote:
Originally Posted by ahameed4755
Посмотреть сообщение
im making a map and its half done but i wanna make a moveable gate how to make it? im using this map editor : https://sampforum.blast.hk/showthread.php?tid=282801
PHP код:
new obj_gates[2];
        
// Create gate
obj_gates[0] = CreateObject(16773397.47662476.632819.51560.00.00.0100.0);
obj_gates[1] = CreateObject(16775412.11722476.632819.51560.00.00.0100.0);
        
// Move gate
MoveObject(obj_gates[0], 397.47662476.632819.5156 10.01.0, -1000.0, -1000.0, -1000.0);
MoveObject(obj_gates[1], 412.11722476.632819.5156 10.01.0, -1000.0, -1000.0, -1000.0); 



Re: How to make a moving gate - ahameed4755 - 24.08.2015

Ok, thanks for reply


Re: How to make a moving gate - Mariciuc223 - 24.08.2015

Quote:
Originally Posted by Logofero
Посмотреть сообщение
PHP код:
new obj_gates[2];
        
// Create gate
obj_gates[0] = CreateObject(16773397.47662476.632819.51560.00.00.0100.0);
obj_gates[1] = CreateObject(16775412.11722476.632819.51560.00.00.0100.0);
        
// Move gate
MoveObject(obj_gates[0], 397.47662476.632819.5156 10.01.0, -1000.0, -1000.0, -1000.0);
MoveObject(obj_gates[1], 412.11722476.632819.5156 10.01.0, -1000.0, -1000.0, -1000.0); 
Don't need to create 2 objects , one it's enough. You can make a bool to check if the gate it's closed/opened and if yes , move the gate ...


Re: How to make a moving gate - Logofero - 24.08.2015

Quote:
Originally Posted by Mariciuc223
Посмотреть сообщение
Don't need to create 2 objects , one it's enough. You can make a bool to check if the gate it's closed/opened and if yes , move the gate ...
it is only for clarity