KillaBeatZ Posted May 13, 2017 Share Posted May 13, 2017 Hi! 1. Question: I Would like to ask, how could i set the vehicle rotation (facing angle) in my vehicle spawning command? So i want to set vehicle rotate to my Character Facing Angle Rotation.. I'm literally newbie with LUA language. This is my first command: addCommandHandler("sv", function(player, command, model) if tonumber(model) and tonumber(model) >= 400 and tonumber(model) < 609 then local vx,vy,vz = getElementPosition(player) local vhle = createVehicle(model,vx,vy,vz) outputChatBox("Vehicle spawned!", player) warpPedIntoVehicle(player,vhle, 0) else outputChatBox("Error!",player) end end ) 2. Question: How could i make 'easy to use' SKIN-SELECTOR that contains "array with few skin id's[about 5 skin id] and GUI left and right arrow and select button"? I have already tried to make this, but doesn't work for me! 3. Question: How can i send Message To all Player, not only the Command user?! [Example: PAWN Language: SendMessageToAll] Thanks the answers, this very important for me! I would like to learn! Have a nice Day! Link to comment
Dimos7 Posted May 13, 2017 Share Posted May 13, 2017 (edited) addCommandHandler("sv", function(player, command, model) if tonumber(model) and tonumber(model) >= 400 and tonumber(model) < 609 then local vx,vy,vz = getElementPosition(player) local vrx , vry, vrz = getElementRotation(player) local vhle = createVehicle(model,vx,vy,vz, vrx, vry, vrz) outputChatBox("Vehicle spawned!", player) warpPedIntoVehicle(player,vhle, 0) else outputChatBox("Error!",player) end end ) for your 3 question instead of player use getRootElement() as for question 2 you need the position of your screen make tables add +1 or - depents the arrow your press and for select you need get skin from table you have it Edited May 13, 2017 by Dimos7 Link to comment
KillaBeatZ Posted May 13, 2017 Author Share Posted May 13, 2017 U can help me please with chat? On Facebook or something.. :\ 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