'LinKin Posted July 25, 2013 Posted July 25, 2013 Hi guys, I wanna make a script so that the user can change his vehicle's doors state. I wanna make it so that for example when the use types /doors 0 4 , the hood turns missing, or if he types /doors 3 3 , the Front right door turns Ajar, damaged. This is what I've done, but without success. I hope someone can help me. function Doorless(localPlayer, doors, state, a, b) local car = getPedOccupiedVehicle(localPlayer) state = setVehicleDoorState ( car, tonumber(a), tonumber(b) ) outputChatBox("The reurn was: "..tostring(state)) end addCommandHandler("doors", Doorless) Regards, LinKin Need a clanwar script? Click here! Do you want some free scripts for your DD server? Visit my website.
-.Paradox.- Posted July 25, 2013 Posted July 25, 2013 What you mean? If you're looking for a cheap paid scripter, don't hesitate to contact me. Great minds discuss ideas, Average minds discuss events and small minds discuss people.
Dealman Posted July 25, 2013 Posted July 25, 2013 Try this; (Server-side!) function Doorless(thePlayer, ...) if(isPedInVehicle(thePlayer)) then local theVehicle = getPedOccupiedVehicle(thePlayer) local message = table.concat({...}, " ") local arrayString = split(message, " ") vehicleStates = setVehicleDoorState(theVehicle, tonumber(arrayString[1]), tonumber(arrayString[2])) else outputChatBox("[server]: #FF0000You must be in a Vehicle to use this!", thePlayer, 69, 69, 69, true) end end addCommandHandler("doors", Doorless) Haven't tried it though If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.
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