Jump to content

SOLVED


Bean666

Recommended Posts

Posted (edited)

hi guys , is there anyway there will be 2 skins that can enter this vehicle with restriction?

i have 125 as restriction and i also want to add 285.

function cars () 
    c1 = createVehicle ( 520, -2891.84765625, 460.4560546875, 4.9140625, 0, 0, 90 ) 
end 
  
addEventHandler ( "onResourceStart", resourceRoot, cars ) 
  
function onEnter(thePlayer) 
    if (getElementModel(thePlayer) ~= 125) then 
        cancelEvent() 
        outputChatBox("This Vehicle Is Locked for The Soprano Vipers", thePlayer, 0, 255, 0) 
    end 
end 
  
addEventHandler("onVehicleStartEnter", getRootElement(), onEnter) 

Edited by Guest

Aftermath

Posted
  
    function cars () 
        c1 = createVehicle ( 520, -2891.84765625, 460.4560546875, 4.9140625, 0, 0, 90 ) 
    end 
      
    addEventHandler ( "onResourceStart", resourceRoot, cars ) 
      
    function onEnter(thePlayer) 
        if (getElementModel(thePlayer) ~= 125 or getElementModel(thePlayer) ~= 285) then 
            cancelEvent() 
            outputChatBox("This Vehicle Is Locked for The Soprano Vipers", thePlayer, 0, 255, 0) 
        end 
    end 
      
    addEventHandler("onVehicleStartEnter", getRootElement(), onEnter) 

Currently developing for International Gaming Community - Join us!

Posted
function cars() 
     c1 = createVehicle(520, -2891,84765625, 460.4560546875, 4.9140625, 0, 0, 90) 
end 
addEventHandler("onResourceStart", resourceRoot, cars) 
  
function onEnter(thePlayer) 
     if getElementModel(thePlayer) ~= 125 and getElementModel(thePlayer) ~= 285 then 
        cancelEvent() 
        outputChatBox("This Vehicle Is Locked for The Soprano Vipers", thePlayer, 0, 255, 0) 
    end 
end 
addEventHandler("onVehicleStartEnter", root, onEnter) 

 

 

Posted
doesn't work please help.
local skins = {[125]=true,[285]=true} 
  
function cars () 
    c1 = createVehicle ( 520, -2891.84765625, 460.4560546875, 4.9140625, 0, 0, 90 ) 
end 
addEventHandler ( "onResourceStart", resourceRoot, cars ) 
  
function onEnter(thePlayer) 
    if thePlayer and isElement(thePlayer) and getElementType(therPlayer) == "player" then 
      if source == c1 then  
        local model = getElementModel(thePlayer) 
        if not (skins[model]) then 
            outputChatBox("This Vehicle Is Locked for The Soprano Vipers", thePlayer, 0, 255, 0) 
            cancelEvent()   
           end  
        end 
    end  
end 
addEventHandler("onVehicleStartEnter", getRootElement(), onEnter) 

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted
This topic is already titled as "SOLVED". @Walid

Yes i can see but he still asking for help read his last post

doesn't work please help.

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

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...