SetCameraBehindPlayer
#1

I'm having problem with this function, while others don't.

pawn Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(PRESSED(KEY_FIRE))
    {
        if(dOnline[playerid])
        {
            GameTextForPlayer(playerid, "~g~ETA 5 Seconds", 2000, 5);
            SetCameraBehindPlayer(playerid);
            SetTimer("Execute", 5000, false);
        }
    }
    return 1;
}
I dunno if i'm doing wrong, the problem is when i click KEY_FIRE, SetCameraBehindPlayer didn't do anything except for the timer and gametext4player.

EDIT:
Continuation... SetCameraBehindPlayer don't function to go at player's back, it stays on its camera position (SetPlayerCameraPos and SetPlayerCameraLookAt).
Reply
#2

How about setting the camera behind the player in the "Execute" function? Or is that too late?

EDIT: Here's the SetCameraBehindPlayer function from WIKI:

Code:
Restore the camera to a place behind the player, after using a function like SetPlayerCameraPos.
https://sampwiki.blast.hk/wiki/SetCameraBehindPlayer
Reply
#3

There is no SetCameraBehindPlayer in Execute, it isn't late too.
Nevermind, i fixed her.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)