How to make Camera Interpolate only for 1 time in OnPlayerRequestClass - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to make Camera Interpolate only for 1 time in OnPlayerRequestClass (
/showthread.php?tid=540578)
How to make Camera Interpolate only for 1 time in OnPlayerRequestClass -
gurmani11 - 05.10.2014
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.
Re: How to make Camera Interpolate only for 1 time in OnPlayerRequestClass -
Dubya - 05.10.2014
Add some variable detecting whether they've already interpolated.
pawn Код:
public OnPlayerRequestClass(playerid, classid) {
if(GetPVarInt(playerid, "HasPlayerInterpolated") != 1) {
InterpolateCameraPos(...);
SetPVarInt(playerid, "HasPlayerInterpolated", 1);
}
// ...
}
Re: How to make Camera Interpolate only for 1 time in OnPlayerRequestClass -
ZBits - 05.10.2014
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
Re: How to make Camera Interpolate only for 1 time in OnPlayerRequestClass -
gurmani11 - 06.10.2014
Thank you appreciated
i fixed it already after the time i posted
Sorry for inconvenience