Jump to content

Ped aim and shoot


Xeno

Recommended Posts

Hey dudes

I want to no how i make peds aim and shoot, i have tried and i fail :? , here is my ped script.

function pedLoad()
local ped2 = createPed (287, -1373, -206, 14, 1050, 1050, 0 ) 
giveWeapon( ped2, 31, 500, true )
setTimer( giveWeapon, 1000, 4, ped2, 31, 500, true)
 
 
local ped = createPed (287, -1374, -206, 14, 1050, 1050, 0 ) 
giveWeapon( ped, 31, 500, true )
setTimer( giveWeapon, 1000, 4, ped, 31, 500, true)
end
 
addEventHandler ( "onResourceStart", getRootElement(), pedLoad )

Link to comment

one, two, three, four...

FOUR!

four posts down, you have IDENTICAL problem..

You should search before asking, that's one, or at least look through first page..

please..

and no, i won't paste link to that topic here.. just get back to the Scripting forum and select that topic.

Link to comment

siiighh.. let me qoute myself .. :?

i think you should:

1 give weapon

2 get ped position

3 get "target" position,

4 do magic-math, and set rotation so ped will be facing at target

5 then set aim target

6 and make it shoot

you are creating peds and giving them weapons..

hurray, point "1" done..

now do the 2-6 ;)

i saw you scripted flying UFO, so i think you can script that too

Link to comment

yup, but you have to set a target anyway i think, so just select random point, or point in front of your ped..

at least try something :)

edit: btw: i always want to check out your ufo script, give me ip/hostname + post of your server :) i had the same idea much before you asked that btw, but didnt have time to make it :P

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...