How to make Camera Interpolate only for 1 time in OnPlayerRequestClass
#1

So, Here is the issue,
Whenever i change skin in (OnPlayerRequestClass) the camera re-interpolates in changing each skin but,
i want it to interpolate once then i will keep on changing skin without interpolating.
Reply
#2

Add some variable detecting whether they've already interpolated.

pawn Код:
public OnPlayerRequestClass(playerid, classid) {
    if(GetPVarInt(playerid, "HasPlayerInterpolated") != 1) {
        InterpolateCameraPos(...);
        SetPVarInt(playerid, "HasPlayerInterpolated", 1);
    }
    // ...
}
Reply
#3

Why are you using Pvars?
pawn Код:
interpolated[MAX_PLAYERS]
and set it equal to 1 the first time player goes to request class and check if the variable is set to 1 on onplayerrequestclass
Reply
#4

Thank you appreciated
i fixed it already after the time i posted
Sorry for inconvenience
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)