04.08.2013, 23:18
Olб galera! Fiz esse sistema para pegar o angulo do jogador e checar com os if em que angulo ele estб olhando! Fiz isto mais nгo deu certo. Sгo oito pontos cardeais!
pawn Код:
new Rotation = GetPlayerFacingAngle(playerid);
if(Rotation > 315 && Rotation < 45) //Norte
{
//BlбBLбBLб
}
if(Rotation < 225 && Rotation > 135) //Sul
{
//BlбBLбBLб
}
if(Rotation < 315 && Rotation > 225) //Oeste
{
//BlбBLбBLб
}
if(Rotation > 45 && Rotation < 135) //Leste
{
//BlбBLбBLб
}
if(Rotation > 270 && Rotation < 360) //Noroeste
{
//BlбBLбBLб
}
if(Rotation > 0 && Rotation < 90) //Nordeste
{
//BlбBLбBLб
}
if(Rotation < 270 && Rotation > 180) //Sudoeste
{
//BlбBLбBLб
}
if(Rotation < 180 && Rotation > 90) //Sudeste
{
//BlбBLбBLб
}