[+REP] Circle all
#10

Quote:
Originally Posted by AbyssMorgan
Посмотреть сообщение
Example Code:
Код:
new max_players = 0, idx = 0;

for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++){
	if(IsPlayerConnected(i)){
		max_players++; //count players
	}
}
	
for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++){
	if(IsPlayerConnected(i)){
		new Float:tx, Float:ty, Float:tz, Float:angle;
		
		GetRandomClockPos(x,y,z, 15.0, tx,ty,tz,angle,single_clock(max_players,idx));
		// center position distance
		
		SetPlayerPos(i,tx,ty,tz);
		SetPlayerFacingAngle(i,angle);
		SetCameraBehindPlayer(i);
		idx++;
	}
}
https://sampforum.blast.hk/showthread.php?tid=591010

Bird's-eye view:
Thank you a lot. I will try it when I'm on PC.
Reply


Messages In This Thread
[+REP] Circle all - by Ahmed21 - 03.08.2016, 09:50
Re: [+REP] Circle all - by Quinncell - 03.08.2016, 10:06
Re: [+REP] Circle all - by Ahmed21 - 03.08.2016, 10:14
Re: [+REP] Circle all - by AbyssMorgan - 03.08.2016, 10:14
Re: [+REP] Circle all - by Ahmed21 - 03.08.2016, 10:19
Re: [+REP] Circle all - by Ahmed21 - 03.08.2016, 12:04
Re: [+REP] Circle all - by AbyssMorgan - 03.08.2016, 12:46
Re: [+REP] Circle all - by Shinja - 03.08.2016, 13:34
Re: [+REP] Circle all - by [cS]Owain - 03.08.2016, 13:36
Re: [+REP] Circle all - by Ahmed21 - 03.08.2016, 17:20

Forum Jump:


Users browsing this thread: 7 Guest(s)