Jump to content

How to add script moveing gate to meta.xml


Jones

Recommended Posts

Sorry im newbie here,im just want ask,how to add script moveing gate to meta.xml

can you show to me the script ?

( sorry ma'bad english )

This is my script gate,in notepad gatescript.lua

function createTheGate () 
  
         myGate1 = createObject ( 10828, 1955.6999511719, -790, 147.10000610352, 0, 0, 287.98461914063 ) 
          
          
         end 
function createTheGate2 () 
        myGate2 = createObject ( 8378, 2005.8000488281, -660.70001220703, 138.60000610352, 0, 0, 16.995849609375 ) 
  
  
         end 
      addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate ) 
      addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate2 ) 
  
  
  
      --1---1--  
 function openMyGate ( ) 
 moveObject ( myGate1, 2500, 1955.6999511719, -790, 154.39999389648, 0, 0, 287.98461914063  ) 
 end 
 addCommandHandler("basebuka",openMyGate) 
  
  
 function closeMyGate ( ) 
 moveObject ( myGate1, 2500, 1955.6999511719, -790, 147.10000610352, 0, 0, 287.98461914063 ) 
 end 
 addCommandHandler("basetutup",closeMyGate) 
      --1---1-- 
      --2---2-- 
 function openMyGate1 () 
 moveObject ( myGate2, 2500, 2005.8000488281, -660.70001220703, 154.39999389648, 0, 0, 16.995849609375 ) 
 end 
 addCommandHandler("tent",openMyGate1) 
  
 function closeMyGate1 () 
 moveObject ( myGate2, 2500, 2005.8000488281, -660.70001220703, 138.60000610352, 0, 0, 16.995849609375 ) 
 end 
 addCommandHandler ("tent",closeMyGate1) 
      --2---2-- 

This is my meta.xml script

<meta> 
    <info type="map" name="Squalo Race" author="erorr404" version="0" description="A boat race around the San Fierro bay."></info> 
    <map src="NOGATE.map" dimension="0"></map> 
    <settings> 
        <setting name="#maxplayers" value="[ 128 ]"></setting> 
        <setting name="#useLODs" value="[ false ]"></setting> 
        <setting name="#gamespeed" value="[ 1 ]"></setting> 
        <setting name="#minplayers" value="[ 0 ]"></setting> 
        <setting name="#gravity" value="[ 0.0080000003799796104 ]"></setting> 
        <setting name="#waveheight" value="[ 0 ]"></setting> 
        <setting name="#locked_time" value="[ false ]"></setting> 
        <setting name="#weather" value="[ 0 ]"></setting> 
        <setting name="#time" value="12:0"></setting> 
    </settings> 
    <script src="mapEditorScriptingExtension_s.lua" type="server"></script> 
    <script src="mapEditorScriptingExtension_c.lua" type="client" validate="false"></script> 
</meta> 
  

Thanks before.

Link to comment
  
<meta> 
    <info type="map" name="Squalo Race" author="erorr404" version="0" description="A boat race around the San Fierro bay."></info> 
    <map src="NOGATE.map" dimension="0"></map> 
    <script src="gatescript.lua" ></script> 
    <settings> 
        <setting name="#maxplayers" value="[ 128 ]"></setting> 
        <setting name="#useLODs" value="[ false ]"></setting> 
        <setting name="#gamespeed" value="[ 1 ]"></setting> 
        <setting name="#minplayers" value="[ 0 ]"></setting> 
        <setting name="#gravity" value="[ 0.0080000003799796104 ]"></setting> 
        <setting name="#waveheight" value="[ 0 ]"></setting> 
        <setting name="#locked_time" value="[ false ]"></setting> 
        <setting name="#weather" value="[ 0 ]"></setting> 
        <setting name="#time" value="12:0"></setting> 
    </settings> 
    <script src="mapEditorScriptingExtension_s.lua" type="server"></script> 
    <script src="mapEditorScriptingExtension_c.lua" type="client" validate="false"></script> 
</meta> 
  

Next time better read this

https://wiki.multitheftauto.com/wiki/Meta.xml

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...