#1

Hello, is there any function like this >> OnPlayerAimOnActor?
so when a players aims on an actor i can let the actor make animation handsup and much more things.

Thanks in advance
Reply
#2

You could use GetPlayerTargetPlayer to get the being aimed at, player id

https://sampwiki.blast.hk/wiki/GetPlayerTargetPlayer

then just use it on OnPlayerUpdate to check if he's aiming or not and do some action
Reply
#3

Thank you that helped me
Reply
#4

Always
Reply
#5

I tried this

PHP код:

public OnPlayerUpdate(playerid)
{
    if(
GetPlayerTargetActor(playerid) == 179)
    {
        
SendClientMessage(playeridCOLOR_WHITE"Works");
    }

But when i aim on any actor that is id 179 nothing happens
Can anyone help me please?
Reply
#6

Never mind fixed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)