[Ajuda] Animaзгo para dois jogadores
#4

Код:
stock SetPlayerFacePlayer(playerid, faceplayerid)
{
	new Float:Px, Float:Py, Float: Pa;
	GetPlayerPos(playerid, Px, Py, Pa);
	new Float:fpX, Float:fpY, Float: fpZ;
	GetPlayerPos(faceplayerid, fpX, fpY, fpZ);
	Pa = floatabs(atan((fpY-Py)/(fpX-Px)));
	if(fpX <= Px && fpY >= Py) Pa = floatsub(180, Pa);
	else if(fpX < Px && fpY < Py) Pa = floatadd(Pa, 180);
	else if(fpX >= Px && fpY <= Py) Pa = floatsub(360.0, Pa);
	Pa = floatsub(Pa, 90.0);
	if(Pa >= 360.0) Pa = floatsub(Pa, 360.0);
	if(!IsPlayerInAnyVehicle(playerid)) SetPlayerFacingAngle(playerid, Pa);
	else SetVehicleZAngle(GetPlayerVehicleID(playerid), Pa);
}
+ ApplyAnimation
Reply


Messages In This Thread
Animaзгo para dois jogadores - by JoshNudock - 22.08.2015, 05:11
Re: Animaзгo para dois jogadores - by IgorLuiz - 22.08.2015, 05:21
Re: Animaзгo para dois jogadores - by JoshNudock - 22.08.2015, 05:31
Re: Animaзгo para dois jogadores - by n0minal - 22.08.2015, 05:59
Re: Animaзгo para dois jogadores - by maikons - 22.08.2015, 08:26

Forum Jump:


Users browsing this thread: 1 Guest(s)