Jump to content

[Ayuda] Como Ponerle GodMode y color a un Auto Privado


PaoloPG

Recommended Posts

Posted
vehicle1 = createVehicle( 411, 0, 0, 10, 0, 0, 0 ) 
state = setVehicleDoorState ( vehicle, 1, 1 )  
  
    function  lockPrivate( player, seat, Login )  
        if ( source == vehicle1 ) then 
            local account = getPlayerAccount( player ) 
            local accountName = ( account and getAccountName ( account ) or "" ) 
             if not( accountName == "Paolo" ) then  
                cancelEvent() 
                outputChatBox("-|ExM|-:#fdfdfdEste Auto Pertenece a #Paolo#151627// ", player, 187, 255, 0, true) --- Mensaje  
            else 
                outputChatBox("-|ExM|- :#fdfdfdBienvenido A tu Auto #Paolo#151627//", player, 187, 255, 0, true) --- MSG 
            end 
        end 
    end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), lockPrivate ) 
setVehicleDamageProof(vehicle, true) 
  

todo funciona pero quiero el godmode y el color del auto :B

Posted
vehicle1 = createVehicle( 411, 0, 0, 10, 0, 0, 0 ) 
state = setVehicleDoorState ( vehicle1, 1, 1 ) 
  
    function  lockPrivate( player, seat, Login ) 
        if ( source == vehicle1 ) then 
            local account = getPlayerAccount( player ) 
            local accountName = ( account and getAccountName ( account ) or "" ) 
             if not( accountName == "Paolo" ) then 
                cancelEvent() 
                outputChatBox("-|ExM|-:#fdfdfdEste Auto Pertenece a #Paolo#151627// ", player, 187, 255, 0, true) --- Mensaje 
            else 
                setVehicleDamageProof(source, true) 
                outputChatBox("-|ExM|- :#fdfdfdBienvenido A tu Auto #Paolo#151627//", player, 187, 255, 0, true) --- MSG 
            end 
        end 
    end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), lockPrivate ) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
vehicle1 = createVehicle( 411, 0, 0, 10, 0, 0, 0 ) 
state = setVehicleDoorState ( vehicle1, 1, 1 ) 
  
    function  lockPrivate( player, seat, Login ) 
        if ( source == vehicle1 ) then 
            local account = getPlayerAccount( player ) 
            local accountName = ( account and getAccountName ( account ) or "" ) 
             if not( accountName == "Paolo" ) then 
                cancelEvent() 
                outputChatBox("-|ExM|-:#fdfdfdEste Auto Pertenece a #Paolo#151627// ", player, 187, 255, 0, true) --- Mensaje 
            else 
                setVehicleDamageProof(source, true) 
                outputChatBox("-|ExM|- :#fdfdfdBienvenido A tu Auto #Paolo#151627//", player, 187, 255, 0, true) --- MSG 
            end 
        end 
    end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), lockPrivate ) 

._. eso devo ponerlo en el client.lua ?

Lo e puesto y igual se daña

Posted

Server side.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Es el tipo de script que debe ser, se define en el archivo meta.xml.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted (edited)
    " PaoloPG" version="1.0" description="" type="script" /> 
  
    

  
vehicle1 = createVehicle( 411, 0, 0, 10, 0, 0, 0 ) 
state = setVehicleDoorState ( vehicle1, 1, 1 ) 
--setVehicleDamageProof ( vehicle1, true ) -- god 
--setVehicleColor ( vehicle1, 145, 0, 161, 124, 0, 0 )  -- color del auto 
--setVehicleHeadLightColor ( vehicle1, 150, 255, 0 )-- luzes de color 
  
  
    vehicle1 = createVehicle( 411, 0, 0, 10, 0, 0, 0 ) 
state = setVehicleDoorState ( vehicle1, 1, 1 ) 
  
    function  lockPrivate( player, seat, Login ) 
        if ( source == vehicle1 ) then 
            local account = getPlayerAccount( player ) 
            local accountName = ( account and getAccountName ( account ) or "" ) 
             if not( accountName == "Paolo" ) then 
                cancelEvent() 
                outputChatBox("-|ExM|-:#fdfdfdEste Auto Pertenece a #Paolo#151627// ", player, 187, 255, 0, true) --- Mensaje 
            else 
                setVehicleDamageProof(source, true) 
                outputChatBox("-|ExM|- :#fdfdfdBienvenido A tu Auto #Paolo#151627//", player, 187, 255, 0, true) --- MSG 
            end 
        end 
    end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), lockPrivate ) 
  

Edited by Guest
  • MTA Team
Posted
    " PaoloPG" version="1.0" description="" type="script" /> 
  
    

  
vehicle1 = createVehicle( 411, 0, 0, 10, 0, 0, 0 ) 
state = setVehicleDoorState ( vehicle1, 1, 1 ) 
--setVehicleDamageProof ( vehicle1, true ) -- god 
--setVehicleColor ( vehicle1, 145, 0, 161, 124, 0, 0 )  -- color del auto 
--setVehicleHeadLightColor ( vehicle1, 150, 255, 0 )-- luzes de color 
  
  
    función  lockPrivate ( jugador , asiento, Entrar ) 
        si ( fuente == vehículo1 ) entonces 
            local de cuenta = getPlayerAccount ( jugador ) 
            locales accountName = ( cuenta y getAccountName ( cuenta ) o "" ) 
             si no ( accountName == "Paolo" ) a continuación, 
                CancelarEvento ( ) 
                outputChatBox ( "- | ExM | -: # fdfdfdEste Auto Pertenece a # Paolo # 151627 / /" , jugador , 187 , 255 , 0 , cierto ) --- Mensaje 
            más 
                setVehicleDamageProof ( fuente, cierto ) 
                outputChatBox ( "- | ExM | -: # fdfdfdBienvenido A tu Auto # Paolo # 151627 / /" , jugador , 187 , 255 , 0 , cierto ) --- MSG 
            final 
        final 
    final 
AddEventHandler ( "onVehicleStartEnter" , getRootElement ( ) , lockPrivate ) 
  

Eso me dio muerte cerebral..Espero solo sea una explicacion

DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp

 
  • MTA Team
Posted
bueno cometi el error de copiar el guion en español y pido disculpas por ese error que tuve :cry::cry::cry::cry: cry:

:D8) esta bien igual el script, solo remplaza lo que esta en español por sus equivalentes en ingles.. Ej: "Si" iria "If" y asi

DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp

 
Posted (edited)
  
vehicle1 = createVehicle( 411, 0, 0, 10, 0, 0, 0 ) 
state = setVehicleDoorState ( vehicle1, 1, 1 ) 
--setVehicleDamageProof ( vehicle1, true ) -- god 
--setVehicleColor ( vehicle1, 145, 0, 161, 124, 0, 0 )  -- color del auto 
--setVehicleHeadLightColor ( vehicle1, 150, 255, 0 )-- luzes de color 
  
  
  
  
    function  lockPrivate( player, seat, Login ) 
        if ( source == vehicle1 ) then 
            local account = getPlayerAccount( player ) 
            local accountName = ( account and getAccountName ( account ) or "" ) 
             if not( accountName == "Paolo" ) then 
                cancelEvent() 
                outputChatBox("-|ExM|-:#fdfdfdEste Auto Pertenece a #Paolo#151627// ", player, 187, 255, 0, true) --- Mensaje 
            else 
                setVehicleDamageProof(source, true) 
                outputChatBox("-|ExM|- :#fdfdfdBienvenido A tu Auto #Paolo#151627//", player, 187, 255, 0, true) --- MSG 
            end 
        end 
    end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), lockPrivate ) 

    " PaoloPG" version="1.0" description="" type="script" /> 
  
    

Edited by Guest
  • MTA Team
Posted

Aqui una pequeña mejor al codigo de flaky, para detectar la cuenta y ademas para cancelar si eres invitado.

vehicle1 = createVehicle( 411, 0, 0, 10, 0, 0, 0 ) 
state = setVehicleDoorState ( vehicle1, 1, 1 ) 
--setVehicleDamageProof ( vehicle1, true ) -- god 
--setVehicleColor ( vehicle1, 145, 0, 161, 124, 0, 0 )  -- color del auto 
--setVehicleHeadLightColor ( vehicle1, 150, 255, 0 )-- luzes de color 
  
  
    vehicle1 = createVehicle( 411, 0, 0, 10, 0, 0, 0 ) 
state = setVehicleDoorState ( vehicle1, 1, 1 ) 
  
    function  lockPrivate( player, seat, Login ) 
        if ( source == vehicle1 ) then 
            local account = getPlayerAccount( player ) 
--Deteccion de cuenta invitado 
if isGuestAccount ( account ) then 
cancelEvent () 
 end 
--Fin de deteccion 
            local accountName =  getAccountName ( account ) 
             if not( accountName == "Paolo" ) then 
                cancelEvent() 
                outputChatBox("-|ExM|-:#fdfdfdEste Auto Pertenece a Paolo", player, 187, 255, 0, true) --- Mensaje 
            else 
                setVehicleDamageProof(source, true)  
                outputChatBox("-|ExM|- :#fdfdfdBienvenido A tu Auto "..accountName, player, 187, 255, 0, true) --- MSG 
            end 
        end 
    end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), lockPrivate ) 
  
  

DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp

 
  • Recently Browsing   0 members

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