[RequstClass] Attach camera to random player - 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: [RequstClass] Attach camera to random player (
/showthread.php?tid=487693)
[RequstClass] Attach camera to random player -
xZdadyZx - 14.01.2014
So yeah, I want to make sytem ( if possible ) for GM I am working on what should, attack camera on random player on server OnPlayerRequstClass. And if there is no players it will move with interpolatecamerapos but that will be other case. So one more time, if someone can help me make, to attach camera to other player when other player is requsting class.
Thanks!
Re: [RequstClass] Attach camera to random player -
sammp - 14.01.2014
pawn Код:
for(new i = 0; i < MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i))
{
new lol = random(i);
TogglePlayerSpectating(playerid, true);
PlayerSpectatePlayer(playerid, lol);
}
else
{
InterCams(playerid);
}
}
stock InterCams(playerid)
{
// interpolation here
return 1;
}
That what you're looking for?