-Doc- Posted June 12, 2015 Posted June 12, 2015 How i can make a script? For example i type /cv bug or bugatti and it should create 496(blista compact) or get vehicle name from part My scripting skills
Tomas Posted June 12, 2015 Posted June 12, 2015 What do you mean? addCommandHandler("cv", function (player, _, arg1) if tostring(arg1) then veh = getVehicleModelFromName(arg1) if veh then createVehicle(veh,unpack( {getElementPosition ( player ) } ) ) else outputChatBox("wrong name", player) end else if tonumber(arg1) then createVehicle(arg1,unpack( {getElementPosition ( player ) } ) ) end end end ) Currently developing for International Gaming Community - Join us!
..:D&G:.. Posted June 13, 2015 Posted June 13, 2015 But at weapons? Not to be mean, but you flamed a topic saying that your server is the best and that you are a good scripter, but you keep making topics asking for scripts, but you don't even try... I am not the only one telling you this -.- MTA:Rust Pre-Alpha Build v.0.3: https://forum.mtasa.com/viewtopic.php?f=114&t=97848 2Pac: ''Only God can judge me!''
-Doc- Posted June 13, 2015 Author Posted June 13, 2015 Im asking where i dont know My scripting skills
Dealman Posted June 13, 2015 Posted June 13, 2015 Im asking where i dont know Once you learn how to properly navigate the MTA Wiki, you'll be able to solve simple issues like these all by yourself. What you're looking for is to take Tomas's example and modify it so you can give yourself a weapon instead, so, you'll want to look under weapon functions, wham, there you have getWeaponIDFromName. 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