Mike269 Posted August 16, 2014 Share Posted August 16, 2014 Hi everyone I'm trying all day to make vehicles that I made with Editor to lock them only for my team is anyone ready to help me via skype or better, if he can connect to my server? IP: 89.142.237.253 Password: 1993 Skype: simonos2000 Thanks very much! Link to comment
Chaos Posted August 16, 2014 Share Posted August 16, 2014 try this veh = createVehicle( 519, 0, 0, 3) function privateCar (thePlayer) if source == veh then local playerTeam = getPlayerTeam ( thePlayer ) local Clann = getTeamFromName ( "Your Team name" ) if ( playerTeam ) == Clann then outputChatBox ( "Welcome to your private car.", thePlayer, 0, 255, 0 ) else cancelEvent () outputChatBox ( "This this a private car.", thePlayer, 255, 0, 0 ) end end end addEventHandler ( "onVehicleStartEnter", root,privateCar ) Link to comment
Mike269 Posted August 16, 2014 Author Share Posted August 16, 2014 So I must place new cars Oo I just place a lot of them with editor lol + what means those numbers: ( 519, 0, 0, 3) Link to comment
Chaos Posted August 16, 2014 Share Posted August 16, 2014 if there are many vehicles then you have to use a table . x,y,z position of the vehicle and 519 is the car id. Link to comment
Mike269 Posted August 16, 2014 Author Share Posted August 16, 2014 please show me how to make table im noob Link to comment
tosfera Posted August 16, 2014 Share Posted August 16, 2014 local vehicleTable = {} table.insert ( vehicleTable, createVehicle ( model, x, y, z ) ) That should get you started, but why do you want to store them in a table... would be easier to do with a small database. Link to comment
Mike269 Posted August 16, 2014 Author Share Posted August 16, 2014 I don't understand that dude lol , I'm not scripter im trying to learn but it's so hard could u show me? Link to comment
Chaos Posted August 16, 2014 Share Posted August 16, 2014 local vehicleTable = {} table.insert ( vehicleTable, createVehicle ( model, x, y, z ) ) That should get you started, but why do you want to store them in a table... would be easier to do with a small database. everyone have a way so i prefer my way Link to comment
tosfera Posted August 16, 2014 Share Posted August 16, 2014 local vehicleTable = {} table.insert ( vehicleTable, createVehicle ( model, x, y, z ) ) That should get you started, but why do you want to store them in a table... would be easier to do with a small database. everyone have a way so i prefer my way That's true, but I did like to start a discussion with you about this. If you don't mind, feel free to send me a PM if you're willing to start this discussion. Link to comment
Mike269 Posted August 16, 2014 Author Share Posted August 16, 2014 So I must make script like that? local vehicleTable = {} table.insert ( vehicleTable, createVehicle ( model, x, y, z ) ) table.insert ( vehicleTable, createVehicle ( model, x, y, z ) ) table.insert ( vehicleTable, createVehicle ( model, x, y, z ) ) table.insert ( vehicleTable, createVehicle ( model, x, y, z ) ) function privateCar (thePlayer) if source == veh then local playerTeam = getPlayerTeam ( thePlayer ) local Clann = getTeamFromName ( "Your Team name" ) if ( playerTeam ) == Clann then outputChatBox ( "Welcome to your private car.", thePlayer, 0, 255, 0 ) else cancelEvent () outputChatBox ( "This this a private car.", thePlayer, 255, 0, 0 ) end end end addEventHandler ( "onVehicleStartEnter", root,privateCar ) Link to comment
tosfera Posted August 16, 2014 Share Posted August 16, 2014 I'll help this guy on skype. 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