A GetPlayerAim function.
#1

A suggestion for 0.3 final - A function like GetPlayerAim(playerid,float,float:y,float:z) which gets the position of a point the player is aiming at. Could be useful when making target practice scripts.

I hope something like this is in 0.3 final release already..

If anyone knows a way to do it already, please tell me how.
Reply
#2

sounds like alot of work for not much worth really
Reply
#3

I support this idea, and if possible, would be better if there is realistic HP loos on shoot, etc, if you shoot someone in head with a gun, he dies, if in arm, some lof HP goes down etc etc
Reply
#4

also good for aiming training on RP servers etc (cause of object destroy desync)
Reply
#5

Wouldn't the SAMP server have to know a player's aim coordinates in order to sync players getting shot?
Reply
#6

Quote:
Originally Posted by Chaser98
Wouldn't the SAMP server have to know a player's aim coordinates in order to sync players getting shot?
Well the server already does know the player's aim, how do you think one player can tell that another player is looking up to shoot at his helicopter?
Reply
#7

Hm, It would be more than just Z think about when your spinning around in one place while aiming, your rX and rY are changing just not your posX and posY. So I think its would be x,y,z and I also would like to see this. I have had a few's ideas for my gm I have put off simply because I didn't really like the current IsPlayerAiming function.
Reply
#8

Quote:
Originally Posted by Seif_ [adream-rp.com
]
Quote:
Originally Posted by Joe Staff
Quote:
Originally Posted by Chaser98
Wouldn't the SAMP server have to know a player's aim coordinates in order to sync players getting shot?
Well the server already does know the player's aim, how do you think one player can tell that another player is looking up to shoot at his helicopter?
I'm not sure if it already knows the player's aim. Synchronizing doesn't mean the server knows if it has that much information, otherwise we would already have GetPlayerAim.
But again, X and Y would be useless, because it'd be the same as the player's position. What we need is GetPlayerZAimAngle no?
Yeah maybe but it would be less to do.
Reply
#9

Funnily enough, I was reading about this yesterday. It's called spherical coordinates. All we currently have is the azimuth (player facing angle) We would need a way to get the elevation angle, and how far you're aiming (the radius). All of these are important to get a X, Y, Z coordinate for the player's aim. However we really could just make do with the elevation angle in a new function.

Just my two cents.

~Cueball~
Reply
#10

Quote:
Originally Posted by brett7
sounds like alot of work for not much worth really
srsly wat?
it is so easy just learn a little bit C++/C/VC++/etc.. it's like saying "changin wont'd levael colurz iz inposibl!" but it is possible to change wanted level RBGA like turning lamp on and off
on-topic:
i like the idea i believe it's very useful
GetPlayerLookAt
GetVehicleLookAt
is cool to.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)