Jump to content

Can I have some Help over her


Haze

Recommended Posts

Hello EveryOne I so a lot of scripts that it make a Hydras For 1 Team Example Army but i didnt Like it when i Create anthor Section is Navy And i dont want the Navy to Go to the Air Force Hydras so i Try this script to make Navy And Air Force have they own Hydra with out sharing the some i tested the script but i didnt Found the Hydra Plz Can Someone Help me And Thank you :)

ArmyVehicles = local vehicle = createVehicle ( 520, 302.74, 1818.85, 17.64) 
ArmyTeam = { ["Army"]=true } 
  
function ArmyenterVehicle ( player, seat, jacked ) 
local team = getPlayerTeam(player) 
    if ( ArmyVehicles[getElementModel ( source )] ) and ( not ArmyTeam[getTeamName ( team )] ) and ( seat == 0 ) then 
        removePedFromVehicle ( player )--force the player out of the vehicle 
        outputChatBox ( "You aren't an Army Member , you mayn't drive this.", player ) --and tell the player why 
    end 
end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), copenterVehicle ) 

Link to comment

What ? xD it dont show up ?

try this

ArmyVehicles = createVehicle ( 520, 302.74, 1818.85, 17.64) 
ArmyTeam = { ["Army"]=true } 
  
function ArmyenterVehicle ( player, seat, jacked ) 
local team = getPlayerTeam(player) 
    if ( ArmyVehicles[getElementModel ( source )] ) and ( not ArmyTeam[getTeamName ( team )] ) and ( seat == 0 ) then 
        removePedFromVehicle ( player )--force the player out of the vehicle 
        outputChatBox ( "You aren't an Army Member , you mayn't drive this.", player ) --and tell the player why 
    end 
end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), copenterVehicle ) 

Link to comment

oh ok

Try this

ArmyVehicles = local vehicle = createVehicle ( 520, 302.74, 1818.85, 17.64) 
ArmyTeam = { ["Army"]=true } 
  
function ArmyenterVehicle ( player, seat, jacked ) 
local team = getPlayerTeam(player) 
    if ( ArmyVehicles[getElementModel ( source )] ) and ( not ArmyTeam[getTeamName ( team )] ) and ( seat == 0 ) then 
        removePedFromVehicle ( player )--force the player out of the vehicle 
        outputChatBox ( "You aren't an Army Member , you mayn't drive this.", player ) --and tell the player why 
    end 
end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), ArmyenterVehicle ) 

Link to comment

kimmis9 you'r function name is " ArmyenterVehicle" and on addEventHandler is " copenterVehicle" and in exchange of removePedFromVehicle use cancelEvent()

ArmyVehicles = createVehicle ( 520, 302.74, 1818.85, 17.64) 
ArmyTeam = { ["Army"]=true } 
  
function ArmyenterVehicle ( player, seat, jacked ) 
local team = getPlayerTeam(player) 
    if ( ArmyVehicles[getElementModel ( source )] ) and ( not ArmyTeam[getTeamName ( team )] ) and ( seat == 0 ) then 
        cancelEvent() 
        outputChatBox ( "You aren't an Army Member , you mayn't drive this.", player ) --and tell the player why 
    end 
end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), ArmyenterVehicle ) 

Link to comment

tested and working

local vehicle1 =createVehicle ( 520, 302.74, 1818.85, 17.64) 
  
ArmyVehicles  ={[vehicle1]=true} 
ArmyTeam = { ["Army"]=true } 
  
function ArmyenterVehicle ( player, seat, jacked ) 
local team = getPlayerTeam(player) 
    if ( ArmyVehicles[source] ) and ( not ArmyTeam[getTeamName ( team )] )  then 
        cancelEvent() 
        outputChatBox ( "You aren't an Army Member , you mayn't drive this.", player ) --and tell the player why 
    end 
end 
addEventHandler ( "onVehicleStartEnter", getRootElement(), ArmyenterVehicle ) 

Edited by Guest
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...