Jump to content

Cars_Team


Haze

Recommended Posts

Hi I want to make some Cars only for Admins and some other group Like Gangs for Example i want Hydra Only For Millitery

We got Script That it Kick you Frome The Car if you are not a Millitery Skin it Kick you frome Hydra i want to Change it to Teams that mean with ACL not with The Skins Can some one Help

  
2.copVehicles = { [523]=true,[598]=true[596]=true,[597]=true,[599]=true} 
3.copSkins = { [280]=true,[281]=true[282]=true,[283]=true,[284]=true,[288]=true } 
4.  
5.function copenterVehicle ( player, seat, jacked ) 
6.    if ( copVehicles[getElementModel ( source )] ) and ( not copSkins[getElementModel ( player )] ) and ( seat == 0 ) then 
7.        removePedFromVehicle ( player )--force the player out of the vehicle 
8.        outputChatBox ( "You aren't a Police Officer , you mayn't drive this.", player ) --and tell the player why 
9.    end 
10.end 
11.addEventHandler ( "onVehicleEnter", getRootElement(), copenterVehicle ) 
12.  
  

Link to comment
copVehicles = { [523]=true,[598]=true[596]=true,[597]=true,[599]=true} 
copTeams = { ["Military"]=true,["Police"]=true } 
  
function copenterVehicle ( player, seat, jacked ) 
local team = getPlayerTeam(player) 
if not team then return end 
    if ( copVehicles[getElementModel ( source )] ) and ( not copTeams[getTeamName(team)] ) and ( seat == 0 ) then 
        removePedFromVehicle ( player )--force the player out of the vehicle 
        outputChatBox ( "You aren't a Police Officer , you mayn't drive this.", player ) --and tell the player why 
    end 
end 
addEventHandler ( "onVehicleEnter", getRootElement(), copenterVehicle ) 

Try that.

Link to comment
copVehicles = { [523]=true,[598]=true, [596]=true,[597]=true,[599]=true} 
copTeams = { ["Military"]=true,["Police"]=true } 
  
function copenterVehicle ( player, seat, jacked ) 
local team = getPlayerTeam(player) 
if not team then return end 
    if ( copVehicles[getElementModel ( source )] ) and ( not copTeams[getTeamName(team)] ) and ( seat == 0 ) then 
        removePedFromVehicle ( player )--force the player out of the vehicle 
        outputChatBox ( "You aren't a Police Officer , you mayn't drive this.", player ) --and tell the player why 
    end 
end 
addEventHandler ( "onVehicleEnter", getRootElement(), copenterVehicle ) 

A mistake in your copVehicles table.

Link to comment

dud its Not working Now Everyone Can Drive the Car I tried to Remove my Self Frome the ACL group and Try to Drive the car and its not working Can someone Help me Plz i Chek the ID of Cars and i chek The Teams Now everyone can Drive the Car and Hydra Plz Help plz

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