11.06.2017, 17:18
tipo eu to fazendo um comando de voar , eu peguei as coords , Angulos , nort , south , weast , east eu vi tipo pra nort abaixa o y do player south ele ergue o y do player tudo isso mais tipo nгo adiantou de nada eu queria tipo olhem isso primeiro:
tipo eu queria especificar que se o angulo do player for = 0 ou 1,2,3,4,5 atй chegar no 90 dai sim ia dar certo teria como ?
meu cуdigo:
eu fiz de um jeito doido utilizando <= >= , mais sу alguns lados funfam й tipo o player vira para o predio dai ele da /voar ate subir la '-' mais sу alguns lados dгo certo tipo eu muro pro nort e ele fica mandando o player para o south
PHP код:
north (0)
|
(90) west- -east (270)
|
south (180)
meu cуdigo:
PHP код:
new Float:X,Float:Y,Float:Z,Float:A; GetPlayerPos(playerid, X, Y, Z); GetPlayerFacingAngle(playerid,A);
if(GetPlayerFacingAngle(playerid,A) <= 89)
{
SetPlayerPos(playerid, X - 5, Y, Z + 5);
SetPlayerHealth(playerid, 1000.0);
}
if(GetPlayerFacingAngle(playerid,A) <= 90)
{
SetPlayerPos(playerid, X, Y - 5, Z + 5);
SetPlayerHealth(playerid, 1000.0);
}
if(GetPlayerFacingAngle(playerid,A) <= 180)
{
SetPlayerPos(playerid, X + 5, Y, Z + 5);
SetPlayerHealth(playerid, 1000.0);
}
if(GetPlayerFacingAngle(playerid,A) <= 360)
{
SetPlayerPos(playerid, X, Y + 5, Z + 5);
SetPlayerHealth(playerid, 1000.0);
}