GetPlayerCameraTargetActor is undefined? +REP
#1

Hey guys!

I'm trying to improve my gamemode and GetPlayerCameraTargetActor doesn't seem to work.
I enabled Camera Targeting, targeting objects work but when I added targeting an actor too it says:

undefined symbol "GetPlayerCameraTargetActor"

pawn Код:
new playerTargetActor = GetPlayerCameraTargetActor(playerid);
I've included a_actor and targeting an object works just fine.

Help me out please!

P.S.: Just tried GetPlayerTargetActor and it doesn't work either.
Reply
#2

Put that code on top of your script :

Quote:

new bool:ActorHandsup[MAX_ACTORS];

Reply
#3

It says MAX_ACTORS is undefined, I went ahead and defined it (set it to 1000) and now it says ActorHandsup is not used and GetPlayerCameraTargetActor is still undefined :\
Reply
#4

Update your includes to 0.3.7.
Reply
#5

My fault buddy..

Check this out : https://sampwiki.blast.hk/wiki/GetPlayerCameraTargetActor

It should helps.

KillerDVX,
Reply
#6

Yeah I use the new includes I copied the gamemode files to the new 0.3.7 server folder, targeting objects work!

Edit.: Yeah I checked that link out too, that's why I find it weird that it is not working.

Edit 2.: I will try to re-download and overwrite the files again later, but I still don't think that's the answer
Reply
#7

Under the OnPlayerUpdate type :

PHP код:
public OnPlayerUpdate(playerid)
{
    new 
playerTargetActor GetPlayerCameraTargetActor(playerid);
 
    if(
playerTargetActor != INVALID_ACTOR_ID)
    {
            
ApplyActorAnimation(playerTargetActor"SHOP""SHP_HandsUp_Scr",4.1,0,0,0,1,0);
        }
    }
    return 
1;

Reply
#8

Alright, I don't know how but you were right, some of the includes weren't overwritten, I guess I copied PAWN from an earlier folder and didn't overwrite everything. Thanks for the help guys!
Reply
#9

Glade to hear that.

Good luck Buddy, KillerDVX.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)