Sign in to follow this  
KillaBeatZ

Question

Recommended Posts

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!


 

Share this post


Link to post
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 by Dimos7

Share this post


Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.