Haze Posted September 10, 2011 Share Posted September 10, 2011 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
mjau Posted September 10, 2011 Share Posted September 10, 2011 What ? 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
Haze Posted September 10, 2011 Author Share Posted September 10, 2011 Thx ALT i know this Name SAES RPG no ?? Link to comment
Haze Posted September 10, 2011 Author Share Posted September 10, 2011 OK DUD Listen The Hydra is Spawnd at his Place it work but when i change my Team to Police or Crimnel i can be Able to Drive the Hydra dud i dont Know why can you Help plz Link to comment
mjau Posted September 10, 2011 Share Posted September 10, 2011 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
bandi94 Posted September 10, 2011 Share Posted September 10, 2011 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
mjau Posted September 10, 2011 Share Posted September 10, 2011 bandi look at my code im the one who is helping him too but i agree haze use cancelevent Link to comment
bandi94 Posted September 10, 2011 Share Posted September 10, 2011 yes i was modifing the code in the same time whit you ... but you press submint some sec faster Link to comment
Haze Posted September 10, 2011 Author Share Posted September 10, 2011 Sry its Not working im able to Drive the Hydra when im not Army omg Link to comment
mjau Posted September 10, 2011 Share Posted September 10, 2011 this is because the team has to be created in the script so try with createTeam function Link to comment
Haze Posted September 10, 2011 Author Share Posted September 10, 2011 oK DUD i Will Try to Create Army Team To Test But its not Good WAY to Make Script Like that Work I Alerday have Teams .. Thank you any way and i Will Try to do it Know Hope it Work Link to comment
CapY Posted September 10, 2011 Share Posted September 10, 2011 Wait , why you just dont create that group in ACL and set the acl permissions ? Link to comment
bandi94 Posted September 10, 2011 Share Posted September 10, 2011 (edited) 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 September 10, 2011 by Guest Link to comment
Haze Posted September 10, 2011 Author Share Posted September 10, 2011 I DONT SEE THE Hydra at it Place Dud i think its not Created Plz Help duds Plz and thank you Link to comment
bandi94 Posted September 10, 2011 Share Posted September 10, 2011 oh sorry i change the x,y,z to test it copy and paste again i put back your coridnates Link to comment
Haze Posted September 10, 2011 Author Share Posted September 10, 2011 Ok dud No Problem I Wait for the New Code ^^ Link to comment
bandi94 Posted September 10, 2011 Share Posted September 10, 2011 i already change the corinates just copy paste my code again Link to comment
Haze Posted September 10, 2011 Author Share Posted September 10, 2011 Thank you dud you saved the Day 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