-Doc- Posted June 12, 2015 Share 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 Link to comment
Tomas Posted June 12, 2015 Share 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 ) Link to comment
..:D&G:.. Posted June 13, 2015 Share 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 -.- Link to comment
-Doc- Posted June 13, 2015 Author Share Posted June 13, 2015 Im asking where i dont know Link to comment
Dealman Posted June 13, 2015 Share 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. 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