tim260 Posted March 6, 2012 Share Posted March 6, 2012 is it possible to use like i did it so [team1]=true etc ? cuz its not working please help me team1 = createVehicle ( 470, -1490.802734375, 2642.0087890625, 55.8359375, 0, 0, 0 ) team2 = createVehicle ( 470, -1490.802734375, 2642.0087890625, 55.8359375, 0, 0, 0 ) -- i know same coords just for showing militaryVehicles = { [team1]=true, [team2]=true } militaryTeams = {["Military"]=true,["Naval"]=true} function lockTheHydras(player, seat, jacked) if ( militaryVehicles[getElementModel ( source )] ) and ( getPlayerTeam( player ) ) and ( not militaryTeams[getTeamName(getPlayerTeam( player ))] ) and ( seat == 0 ) then outputChatBox ( "You aren't a Military Officer , you mayn't drive this.", player ) --and tell the player why cancelEvent() end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockTheHydras ) Link to comment
Josh Posted March 6, 2012 Share Posted March 6, 2012 if I understood you right. protectVehicles = { [470]=true } function enterVehicle ( player, seat, jacked ) if ( protectVehicles[getElementModel(source)] ) and getTeamName(getPlayerTeam(player)) ~= "Military" and getTeamName(getPlayerTeam(player)) ~= "Naval" and ( seat == 0 ) then cancelEvent() outputChatBox ("You cannot enter this vehicle.", player) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle )) Link to comment
tim260 Posted March 6, 2012 Author Share Posted March 6, 2012 if I understood you right. protectVehicles = { [470]=true } function enterVehicle ( player, seat, jacked ) if ( protectVehicles[getElementModel(source)] ) and getTeamName(getPlayerTeam(player)) ~= "Military" and getTeamName(getPlayerTeam(player)) ~= "Naval" and ( seat == 0 ) then cancelEvent() outputChatBox ("You cannot enter this vehicle.", player) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle )) No thats all cars i just want the cars i created with createvehicle Link to comment
Castillo Posted March 6, 2012 Share Posted March 6, 2012 team1 = createVehicle ( 470, -1490.802734375, 2642.0087890625, 55.8359375, 0, 0, 0 ) team2 = createVehicle ( 470, -1490.802734375, 2642.0087890625, 55.8359375, 0, 0, 0 ) -- i know same coords just for showing militaryVehicles = { [team1]=true, [team2]=true } militaryTeams = {["Military"]=true, ["Naval"]=true} function lockTheHydras(player, seat, jacked) if ( militaryVehicles[source] ) and ( getPlayerTeam( player ) ) and ( not militaryTeams[getTeamName(getPlayerTeam( player ))] ) and ( seat == 0 ) then outputChatBox ( "You aren't a Military Officer , you mayn't drive this.", player ) --and tell the player why cancelEvent() end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockTheHydras ) Link to comment
tim260 Posted March 6, 2012 Author Share Posted March 6, 2012 team1 = createVehicle ( 470, -1490.802734375, 2642.0087890625, 55.8359375, 0, 0, 0 ) team2 = createVehicle ( 470, -1490.802734375, 2642.0087890625, 55.8359375, 0, 0, 0 ) -- i know same coords just for showing militaryVehicles = { [team1]=true, [team2]=true } militaryTeams = {["Military"]=true, ["Naval"]=true} function lockTheHydras(player, seat, jacked) if ( militaryVehicles[source] ) and ( getPlayerTeam( player ) ) and ( not militaryTeams[getTeamName(getPlayerTeam( player ))] ) and ( seat == 0 ) then outputChatBox ( "You aren't a Military Officer , you mayn't drive this.", player ) --and tell the player why cancelEvent() end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockTheHydras ) ty Link to comment
Absence2 Posted March 6, 2012 Share Posted March 6, 2012 I just wanted to butt in and ask, is "Mayn't" a word o_o? Link to comment
Josh Posted March 6, 2012 Share Posted March 6, 2012 I just wanted to butt in and ask, is "Mayn't" a word o_o? It is, just rarley spoken. may·n't ... Contraction of may not. Link to comment
tim260 Posted March 6, 2012 Author Share Posted March 6, 2012 I just wanted to butt in and ask, is "Mayn't" a word o_o? It is, just rarley spoken. may·n't ... Contraction of may not. i know as i just copied this i already thought it sounded really strange to Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now