Gun Point.
#1

How can i get the gun point when i click right mouse the player is aiming. how do i get the pos weapon aiming somewhere ? sorry for bad english
Reply
#2

Search.
Reply
#3

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
Search.
Good useful comment.



to get gunpoint, use https://sampwiki.blast.hk/wiki/GetPlayerCameraFrontVector
and probably MapAndreas
Reply
#4

?? can anyone give me a code ?
Reply
#5

Help please
Reply
#6

This is a simple one I made:
pawn Код:
stock CheckPlayerAiming(playerid, Float:x, Float:y, Float:z, Float:radius)
{
    new Float:cx,Float:cy,Float:cz,Float:fx,Float:fy,Float:fz;
    GetPlayerCameraPos(playerid, cx, cy, cz);
    GetPlayerCameraFrontVector(playerid, fx, fy, fz);
    return (radius >= DistanceCameraTargetToLocation(cx, cy, cz, x, y, z, fx, fy, fz));
}
Reply
#7

Hmm. I want to make another function like createexplosion in the gun point if I want to do that ishould make the command like ? Give me exemple.
Reply
#8

help i'm very need this
Reply
#9

Help
Reply
#10

This might be useful, you can also get the targets pos if you need that.
https://sampwiki.blast.hk/wiki/GetPlayerTargetPlayer

EDIT: My bad thought by "gun point" you meant a player at gun point, i see that's not the case now.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)