Jump to content

Como hacer esto


Plate

Recommended Posts

mmm...

hacer eso es facil

aqui te paso un codigo que es de alexs_steel y me lo presto :P

  
  
addEventHandler ( "onResourceStart", resourceRoot, 
    function ( ) 
        vehicles2 = { } 
        for index = 1, 20 do 
            vehicles2 [ getElementByID ( "autos".. index ) ] = true             ---te lo explicare tienes que hacer un map con este script y poner vehiculos y cambiarle variable a los vehiculos a autos1 autos2 autos3 , asi con el numero 
        end 
    end 
) 
  
addEventHandler ( "onVehicleStartEnter", root, 
    function ( thePlayer, seat ) 
        if ( seat ~= 0 ) then 
            return 
        end 
        if ( vehicles [ source ] ) then 
            if ( getPlayerTeam ( thePlayer ) and getTeamName ( getPlayerTeam ( thePlayer ) ) ~= "TUTEAM" ) then           ---en TUTEAM pones el TEAM en el que quieras los autos restringidos 
                outputChatBox ( "Este vehiculo esta restringido a los membros del TUTEAM", thePlayer, 255, 0, 0 )       ---y agregamos un mensaje 
                cancelEvent ( ) 
            end 
        end 
    end 
) 

Link to comment

no entiendo como poner eso de los autos elmota

te paso como lo tengo echo todo el mapa el resoruce que me pasastes :D

y el meta.xml

Mapa =

"editor_main"> 
    "object (stadbridge_SFS) (1)" doublesided="false" model="11095" interior="0" dimension="0" posX="303.79998779297" posY="1914.3000488281" posZ="21.89999961853" rotX="0" rotY="0" rotZ="98"> 
    "vehicle (autos1)" paintjob="3" model="497" plate="9DY0Q3B" interior="0" dimension="0" posX="-2227.1999511719" posY="2327.5" posZ="7.8000001907349" rotX="0" rotY="0" rotZ="0">
    "vehicle (autos2)" paintjob="3" model="497" plate="W8RLA9I" interior="0" dimension="0" posX="-2226.6000976563" posY="2303.1000976563" posZ="5.5999999046326" rotX="0" rotY="0" rotZ="0">
    "vehicle (autos3)" paintjob="3" model="548" plate="9XZT9Z8" interior="0" dimension="0" posX="-2293.1999511719" posY="2415.1999511719" posZ="6.5" rotX="0" rotY="0" rotZ="44">
    "vehicle (autos4)" paintjob="3" model="548" plate="1YLX178" interior="0" dimension="0" posX="-2270.8000488281" posY="2392" posZ="6.5" rotX="0" rotY="0" rotZ="43.994750976563">
    "vehicle (autos5)" paintjob="3" model="446" plate="37UI2DY" interior="0" dimension="0" posX="-2234.8999023438" posY="2454.8000488281" posZ="0" rotX="0" rotY="0" rotZ="318">
    "vehicle (autos6)" paintjob="3" model="446" plate="KQGWVRU" interior="0" dimension="0" posX="-2231.6000976563" posY="2451" posZ="0" rotX="0" rotY="0" rotZ="317.99926757813">
    "vehicle (autos7)" paintjob="3" model="446" plate="83SN66N" interior="0" dimension="0" posX="-2227.3000488281" posY="2446.3000488281" posZ="0" rotX="0" rotY="0" rotZ="317.99926757813">
    "vehicle (autos8)" paintjob="3" model="446" plate="SX9X8VZ" interior="0" dimension="0" posX="-2198.6999511719" posY="2418.6999511719" posZ="0" rotX="0" rotY="0" rotZ="317.99926757813">
    "vehicle (autos9)" paintjob="3" model="446" plate="QEA64F7" interior="0" dimension="0" posX="-2202.6000976563" posY="2422.6000976563" posZ="0" rotX="0" rotY="0" rotZ="317.99926757813">
    "vehicle (autos10)" paintjob="3" model="446" plate="P7G5NVN" interior="0" dimension="0" posX="-2206.6000976563" posY="2426.3999023438" posZ="0" rotX="0" rotY="0" rotZ="317.99926757813">
    "vehicle (Tropic) (1)" paintjob="3" model="454" plate="RSXXH5Q" interior="0" dimension="0" posX="-2244.6999511719" posY="2403.1000976563" posZ="0" rotX="0" rotY="0" rotZ="320">
    "vehicle (Tropic) (2)" paintjob="3" model="454" plate="C1QFX1N" interior="0" dimension="0" posX="-2249.3000488281" posY="2408.5" posZ="0" rotX="0" rotY="0" rotZ="319.99877929688">
    "vehicle (Enforcer) (5)" paintjob="3" model="427" plate="XXC7QRL" interior="0" dimension="0" posX="-2271.1000976563" posY="2285.3000488281" posZ="5.0999999046326" rotX="0" rotY="0" rotZ="270">
    "vehicle (Enforcer) (7)" paintjob="3" model="427" plate="H734HV8" interior="0" dimension="0" posX="-2271.3999023438" posY="2288.3000488281" posZ="5.0999999046326" rotX="0" rotY="0" rotZ="270">
    "vehicle (Enforcer) (8)" paintjob="3" model="427" plate="7ZEDMNV" interior="0" dimension="0" posX="-2271.3000488281" posY="2291.5" posZ="5.0999999046326" rotX="0" rotY="0" rotZ="270">
    "vehicle (Police SF) (1)" paintjob="3" model="597" plate="P0TTIZY" interior="0" dimension="0" posX="-2271.3000488281" posY="2294.3000488281" posZ="4.6999998092651" rotX="0" rotY="0" rotZ="270">
    "vehicle (Police SF) (9)" paintjob="3" model="597" plate="FCVW8WS" interior="0" dimension="0" posX="-2271.3999023438" posY="2297.3999023438" posZ="4.6999998092651" rotX="0" rotY="0" rotZ="270">
    "vehicle (Police SF) (10)" paintjob="3" model="597" plate="PJI89KC" interior="0" dimension="0" posX="-2271.1999511719" posY="2300.3000488281" posZ="4.6999998092651" rotX="0" rotY="0" rotZ="270">
    "vehicle (Police SF) (11)" paintjob="3" model="597" plate="FS9A3J0" interior="0" dimension="0" posX="-2271.1999511719" posY="2303.1000976563" posZ="4.6999998092651" rotX="0" rotY="0" rotZ="270">
    "vehicle (Barracks) (1)" paintjob="3" model="433" plate="OZTG0Y6" interior="0" dimension="0" posX="-2269.1000976563" posY="2306.3999023438" posZ="5.4000000953674" rotX="0" rotY="0" rotZ="270">
    "vehicle (Barracks) (2)" paintjob="3" model="433" plate="RHHA89W" interior="0" dimension="0" posX="-2269.1000976563" posY="2310.1999511719" posZ="5.4000000953674" rotX="0" rotY="0" rotZ="270">
    "vehicle (Barracks) (3)" paintjob="3" model="433" plate="CRG1NO6" interior="0" dimension="0" posX="-2269.1999511719" posY="2314.1999511719" posZ="5.4000000953674" rotX="0" rotY="0" rotZ="270">
    "vehicle (Sanchez) (1)" paintjob="3" model="468" plate="AGXYY9Q" interior="0" dimension="0" posX="-2270.8000488281" posY="2318.5" posZ="4.5999999046326" rotX="0" rotY="0" rotZ="272">
    "vehicle (Sanchez) (2)" paintjob="3" model="468" plate="AP8AJLT" interior="0" dimension="0" posX="-2270.8000488281" posY="2321" posZ="4.5999999046326" rotX="0" rotY="0" rotZ="271.99951171875">
    "vehicle (Sanchez) (3)" paintjob="3" model="468" plate="EIY7PD1" interior="0" dimension="0" posX="-2270.8999023438" posY="2323.8999023438" posZ="4.5999999046326" rotX="0" rotY="0" rotZ="271.99951171875">
    "vehicle (Sanchez) (4)" paintjob="3" model="468" plate="JEHZD1A" interior="0" dimension="0" posX="-2270.8999023438" posY="2326.8999023438" posZ="4.5999999046326" rotX="0" rotY="0" rotZ="271.99951171875">
    "vehicle (Berkley's RC Van) (1)" paintjob="3" model="459" plate="OWCCHD4" interior="0" dimension="0" posX="-2251.5" posY="2285.3000488281" posZ="5" rotX="0" rotY="0" rotZ="92">
    "vehicle (Berkley's RC Van) (2)" paintjob="3" model="459" plate="29YLMBR" interior="0" dimension="0" posX="-2251.8000488281" posY="2288.1000976563" posZ="5" rotX="0" rotY="0" rotZ="92">
    "vehicle (Berkley's RC Van) (3)" paintjob="3" model="459" plate="K1WBWO9" interior="0" dimension="0" posX="-2251.8999023438" posY="2291.1999511719" posZ="5" rotX="0" rotY="0" rotZ="91.99951171875">
    "vehicle (Berkley's RC Van) (4)" paintjob="3" model="459" plate="8412SFG" interior="0" dimension="0" posX="-2252.3000488281" posY="2294" posZ="5" rotX="0" rotY="0" rotZ="91.99951171875">

El resoruce =

addEventHandler ( "onResourceStart", resourceRoot, 
    function ( ) 
        vehicles2 = {auots1, autos2, autos3, autos4, autos5, autos6 , autos7, autos8, autos9, autos10 } 
        for index = 1, 20 do 
            vehicles2 [ getElementByID ( "autos".. index ) ] = true  
        end 
    end 
) 
  
addEventHandler ( "onVehicleStartEnter", root, 
    function ( thePlayer, seat ) 
        if ( seat ~= 0 ) then 
            return 
        end 
        if ( vehicles [ source ] ) then 
            if ( getPlayerTeam ( thePlayer ) and getTeamName ( getPlayerTeam ( thePlayer ) ) ~= "MarineForce" ) then          
                outputChatBox ( "Este vehiculo esta restringido a los membros del MarineForce", thePlayer, 255, 0, 0 )       
                cancelEvent ( ) 
            end 
        end 
    end 
) 

y el meta.xml =

     
     
    "amx" type="map" version="1.0.0">
    "Marine.map" dimension="0">
    
        "#minplayers" value="[ 0 ]">
        "#maxplayers" value="[ 128 ]">
        "#gravity" value="[ 0.008000 ]">
        "#weather" value="[ 17 ]">
        "#time" value="00:0">
        "#locked_time" value="[ false ]">
        "#waveheight" value="[ 0 ]">
        "#gamespeed" value="[ 1 ]">
    
        

Link to comment

nose cuales vehiculos qres bloquear asi que te are un ejemplo

    "autos1" paintjob="3" model="597" plate="P0TTIZY" interior="0" dimension="0" posX="-2271.3000488281" posY="2294.3000488281" posZ="4.6999998092651" rotX="0" rotY="0" rotZ="270">
"autos2" paintjob="3" model="597" plate="P0TTIZY" interior="0" dimension="0" posX="-2271.3000488281" posY="2294.3000488281" posZ="4.6999998092651" rotX="0" rotY="0" rotZ="270">        ---y asi vamos en auto2, auto3, auto4, eso es lo q ase el index  
  

en vehicles2 no tenes q poner nada

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...