Akam Posted July 26, 2013 Share Posted July 26, 2013 How to make a script, that just makes a tursimo to fly, not other cars, and make it so that only admins can enter the turismo. thanks for your help Link to comment
Alen141 Posted July 26, 2013 Share Posted July 26, 2013 getVehicleType setWorldSpecialPropertyEnabled Link to comment
Akam Posted July 26, 2013 Author Share Posted July 26, 2013 getVehicleType setWorldSpecialPropertyEnabled what should i do with that? can you give me a complete script? Link to comment
manve1 Posted July 26, 2013 Share Posted July 26, 2013 You have to make a script with those functions, tho if you don't know how you might want to pay someone to script it for you. Link to comment
EstrategiaGTA Posted July 26, 2013 Share Posted July 26, 2013 getPedOccupiedVehicle setWorldSpecialPropertyEnabled Link to comment
Akam Posted July 27, 2013 Author Share Posted July 27, 2013 Sorry but can someone make the script for me cuz i cant script Link to comment
denny199 Posted July 27, 2013 Share Posted July 27, 2013 Try it for yourself first, and then if it doesn't work post it here. Ignore those other 2 guys btw, you need more functions here they are: https://wiki.multitheftauto.com/wiki/On ... hicleEnter https://wiki.multitheftauto.com/wiki/Se ... rtyEnabled https://wiki.multitheftauto.com/wiki/GetElementModel https://wiki.multitheftauto.com/wiki/GetElementData Also for server side for chekking the admin: https://wiki.multitheftauto.com/wiki/IsObjectInACLGroup https://wiki.multitheftauto.com/wiki/SetElementData https://wiki.multitheftauto.com/wiki/OnPlayerLogin Good luck. Link to comment
Akam Posted July 27, 2013 Author Share Posted July 27, 2013 Try it for yourself first, and then if it doesn't work post it here.Ignore those other 2 guys btw, you need more functions here they are: https://wiki.multitheftauto.com/wiki/On ... hicleEnter https://wiki.multitheftauto.com/wiki/Se ... rtyEnabled https://wiki.multitheftauto.com/wiki/GetElementModel https://wiki.multitheftauto.com/wiki/GetElementData Also for server side for chekking the admin: https://wiki.multitheftauto.com/wiki/IsObjectInACLGroup https://wiki.multitheftauto.com/wiki/SetElementData https://wiki.multitheftauto.com/wiki/OnPlayerLogin Good luck. i really dont know how to script i dont know how to link server functions and client functions together and even if i learn i just can't do it cuz i am a noob but please can someone just make one? Link to comment
EstrategiaGTA Posted July 27, 2013 Share Posted July 27, 2013 Try it for yourself first, and then if it doesn't work post it here.Ignore those other 2 guys btw, you need more functions here they are: https://wiki.multitheftauto.com/wiki/On ... hicleEnter https://wiki.multitheftauto.com/wiki/Se ... rtyEnabled https://wiki.multitheftauto.com/wiki/GetElementModel https://wiki.multitheftauto.com/wiki/GetElementData Also for server side for chekking the admin: https://wiki.multitheftauto.com/wiki/IsObjectInACLGroup https://wiki.multitheftauto.com/wiki/SetElementData https://wiki.multitheftauto.com/wiki/OnPlayerLogin Good luck. i really dont know how to script i dont know how to link server functions and client functions together and even if i learn i just can't do it cuz i am a noob but please can someone just make one? triggerClientEvent --or triggerServerEvent Link to comment
denny199 Posted July 27, 2013 Share Posted July 27, 2013 You are ASKING us to do it. Please, try it for yourself first and then post your tried code here, or are you just so lazy? Link to comment
papam77 Posted July 27, 2013 Share Posted July 27, 2013 function FLY () local car = getVehicleName() if ( car == Turismo ) then setWorldSpecialPropertyEnabled ( "aircars", true ) end end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()), FLY ) Now it is your turn Link to comment
iMr.3a[Z]eF Posted July 27, 2013 Share Posted July 27, 2013 Where is the createVehicle? Link to comment
papam77 Posted July 27, 2013 Share Posted July 27, 2013 Why createVehicle? I think he wants it for Freeroam or something like that, so I guess he already has vehicles in map. And if is in the map vehicle called Turismo, it will be flying. Or not? Link to comment
iMr.3a[Z]eF Posted July 27, 2013 Share Posted July 27, 2013 (edited) Why createVehicle? I think he wants it for Freeroam or something like that, so I guess he already has vehicles in map.And if is in the map vehicle called Turismo, it will be flying. Or not? Right, but in this function getVehicleName you most write the vehicle in the first argument Ex: local vehicle = createVehicle(...) function FLY () local car = getVehicleName(vehicle) if car == "Turismo" then setWorldSpecialPropertyEnabled ( "aircars", true ) else outputChatBox("* Your vehicle isn't Turismo", localPlayer) end end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()), FLY ) Or if no't specific Ex: local vehicle = getElementType("vehicle") function FLY () local car = getVehicleName(vehicle) if car == "Turismo" then setWorldSpecialPropertyEnabled ( "aircars", true ) else outputChatBox("* Your vehicle isn't Turismo", source) end end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()), FLY ) Edited July 27, 2013 by Guest Link to comment
iMr.3a[Z]eF Posted July 27, 2013 Share Posted July 27, 2013 Thank you for repair Any time. Link to comment
Baseplate Posted July 27, 2013 Share Posted July 27, 2013 Guys, you failed. c.lua addEvent("onEnter", true) addEventHandler("onEnter", root, function() setWorldSpecialPropertyEnabled("aircars", true) end ) addEventHandler ("onClientVehicleExit", localPlayer, function(thePlayer, seat) if thePlayer == getLocalPlayer() then setWorldSpecialPropertyEnabled ("aircars",false) end end ) s.lua addEventHandler("onVehicleEnter", root, function(thePlayer, seat, jacked) local accName = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user."..accName, aclGetGroup "Admin")) and (getElementModel(source) == 451) then triggerClientEvent(thePlayer, "onEnter", thePlayer) end end ) Link to comment
Akam Posted July 27, 2013 Author Share Posted July 27, 2013 Guys, you failed.c.lua addEvent("onEnter", true) addEventHandler("onEnter", root, function() setWorldSpecialPropertyEnabled("aircars", true) end ) addEventHandler ("onClientVehicleExit", localPlayer, function(thePlayer, seat) if thePlayer == getLocalPlayer() then setWorldSpecialPropertyEnabled ("aircars",false) end end ) s.lua addEventHandler("onVehicleEnter", root, function(thePlayer, seat, jacked) local accName = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user."..accName, aclGetGroup "Admin")) and (getElementModel(source) == 451) then triggerClientEvent(thePlayer, "onEnter", thePlayer) end end ) error: Server.lua:4: 'then' expected near ')' Link to comment
Baseplate Posted July 27, 2013 Share Posted July 27, 2013 c.lua addEvent("onEnter", true) addEventHandler("onEnter", root, function() setWorldSpecialPropertyEnabled("aircars", true) end ) addEventHandler ("onClientVehicleExit", localPlayer, function(thePlayer, seat) if thePlayer == getLocalPlayer() then setWorldSpecialPropertyEnabled ("aircars",false) end end ) s.lua addEventHandler("onVehicleEnter", root, function(thePlayer, seat, jacked) local accName = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user."..accName, aclGetGroup "Admin") and (getElementModel(source) == 451) then triggerClientEvent(thePlayer, "onEnter", thePlayer) end end ) And please next time, if you get such errors just fix it by yourself. Link to comment
Akam Posted July 27, 2013 Author Share Posted July 27, 2013 c.lua addEvent("onEnter", true) addEventHandler("onEnter", root, function() setWorldSpecialPropertyEnabled("aircars", true) end ) addEventHandler ("onClientVehicleExit", localPlayer, function(thePlayer, seat) if thePlayer == getLocalPlayer() then setWorldSpecialPropertyEnabled ("aircars",false) end end ) s.lua addEventHandler("onVehicleEnter", root, function(thePlayer, seat, jacked) local accName = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user."..accName, aclGetGroup "Admin") and (getElementModel(source) == 451) then triggerClientEvent(thePlayer, "onEnter", thePlayer) end end ) And please next time, if you get such errors just fix it by yourself. nice but even when i am not an admin i can drive the car i want to let admin drive and i want non admins to sit in the seats Link to comment
Baseplate Posted July 27, 2013 Share Posted July 27, 2013 Why don't you finish it? for sure we aren't your slaves nor employeed by you, use this function. setVehicleLocked Link to comment
Akam Posted July 27, 2013 Author Share Posted July 27, 2013 Why don't you finish it? for sure we aren't your slaves nor employeed by you, use this function. setVehicleLocked lol but thanks for your help 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