Jump to content

[решено]помогите с teamVehicle


Ruga

Recommended Posts

нужно модель авто поставить на проверку ACL group или team , есть на проверку скина, а нужно на team или ACL, что бы игрок не входящий в состав team или ACL group, не мог сесть в авто)) спасибо заранее, вопрос наверно детский im sorry

Edited by Guest
Link to comment

мучался долго , получилось что это придеться писать каждой машине, а нужно поставить на модель, что из этого можно сделать?

theVehicle = createVehicle ( 596, 1545.699, -1659, 5.599, 0, 0, 90.477)   
    
    function enterVehicle ( thePlayer, seat, jacked ) 
        if ( source == theVehicle ) and ( getPlayerTeam(thePlayer) and getTeamName(getPlayerTeam(thePlayer)) ~= "Police" ) then 
            removePedFromVehicle ( thePlayer ) 
    if ( theVehicle ) then 
    toggleVehicleRespawn ( theVehicle, true )  
    setVehicleIdleRespawnDelay ( theVehicle, 4000 ) 
            outputChatBox ( "Машина полиции", thePlayer ) 
        end 
      end 
    end 
    addEventHandler ( "onVehicleEnter", getRootElement(), enterVehicle ) 

Link to comment

What was that? Вот код:

CarModels = { [596]=true } -- Сюда запиливай модели машин 
  
function CarsClosed ( thePlayer, seat, jacked ) 
    if CarModels[getElementModel(source)] and seat==0 and getPlayerTeam(thePlayer)~=getTeamFromName("Police") then 
        removePedFromVehicle(thePlayer) 
        toggleVehicleRespawn ( source, true )  
        setVehicleIdleRespawnDelay ( source, 4000 ) 
        outputChatBox ( "Машина полиции", thePlayer ) 
    end 
end 
addEventHandler ( "onVehicleEnter", getRootElement(), CarsClosed ) 

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