Jump to content

Cars_Team


Haze

Recommended Posts

Posted

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.  
  

Ingame nick: FWC>Haze

Server I play: FWCentral

Job: FWCentral Developer

Website: fwcentral.net

276473_205836092791903_297368_n.jpg

default.png?k=0e33bf78535ebcd5e63c863cd33516c6&10966802

default.png?k=557262ebc578ba0f5fbb0b9176e6820e&10966803

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

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

SCRIPT ERROR: Restricted_Cars\script2.lua:1: '}' expected near '['

[2011-06-20 22:57:03] WARNING: Loading script failed: Restricted_Cars\script2.lua:1: '}' expected near '[' I got this ERROR

Ingame nick: FWC>Haze

Server I play: FWCentral

Job: FWCentral Developer

Website: fwcentral.net

276473_205836092791903_297368_n.jpg

default.png?k=0e33bf78535ebcd5e63c863cd33516c6&10966802

default.png?k=557262ebc578ba0f5fbb0b9176e6820e&10966803

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

Business System viewtopic.php?f=108&t=35797

Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726

SQLite Tutorial viewtopic.php?f=148&t=38203

Posted

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

Ingame nick: FWC>Haze

Server I play: FWCentral

Job: FWCentral Developer

Website: fwcentral.net

276473_205836092791903_297368_n.jpg

default.png?k=0e33bf78535ebcd5e63c863cd33516c6&10966802

default.png?k=557262ebc578ba0f5fbb0b9176e6820e&10966803

Posted

no its not Should i add the Name Of the Car in ACL Group or what Plz Can Tape what sould i Add in ACL group in The Team

Ingame nick: FWC>Haze

Server I play: FWCentral

Job: FWCentral Developer

Website: fwcentral.net

276473_205836092791903_297368_n.jpg

default.png?k=0e33bf78535ebcd5e63c863cd33516c6&10966802

default.png?k=557262ebc578ba0f5fbb0b9176e6820e&10966803

Posted

can you Make the Code for Me plz I realy Need Your Help Plz

Ingame nick: FWC>Haze

Server I play: FWCentral

Job: FWCentral Developer

Website: fwcentral.net

276473_205836092791903_297368_n.jpg

default.png?k=0e33bf78535ebcd5e63c863cd33516c6&10966802

default.png?k=557262ebc578ba0f5fbb0b9176e6820e&10966803

Posted

Ok Thanks i Willl Try Thank you for your Help

Ingame nick: FWC>Haze

Server I play: FWCentral

Job: FWCentral Developer

Website: fwcentral.net

276473_205836092791903_297368_n.jpg

default.png?k=0e33bf78535ebcd5e63c863cd33516c6&10966802

default.png?k=557262ebc578ba0f5fbb0b9176e6820e&10966803

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