[Ajuda] Por que nada acontece ?? Actors
#1

Fala glr, entao ainda sou iniciante em codigos aqui, sei que ja devia ter aprendido ZCMD , mas vou aprender mais pra frente por causa do tempo .

Fiz um codigo pra testar os actor mas nao acontece nada, queria criar um actor e adicionar uma animacao a ele.

Код:
#include <a_samp>
#include <a_actor>

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/teste", true))
    {
               new Float:x, Float:y, Float:z;
               new Float:Angle;    
               new ActorCJ;
               GetPlayerPos(playerid, x, y, z);
               GetPlayerFacingAngle(playerid, Angle);
               if(Angle == 0.0) 
               {
               ActorCJ = CreateActor(0, x, y + 1.0, z, 0.0);
               SetActorFacingAngle(ActorCJ, 180.0);
               ApplyAnimation(playerid, "BD_FIRE", "Playa_Kiss_03", 4.1, 1, 1, 1, 1, 1, 1);
               ApplyActorAnimation(ActorCJ, "BD_FIRE", "Grlfrd_Kiss_03", 4.1, 0, 0, 0, 0, 0);
               }
               else if(Angle == 180.0) 
               {
               ActorCJ = CreateActor(0, x, y + 1.0, z, 0.0);
               SetActorFacingAngle(ActorCJ, 0.0);
               ApplyAnimation(playerid, "BD_FIRE", "Playa_Kiss_03", 4.1, 1, 1, 1, 1, 1, 1);
               ApplyActorAnimation(ActorCJ, "BD_FIRE", "Grlfrd_Kiss_03", 4.1, 0, 0, 0, 0, 0);
               }
               else if(Angle == 90.0) 
               {
               ActorCJ = CreateActor(0, x, y + 1.0, z, 0.0);
               SetActorFacingAngle(ActorCJ, 270.0);
               ApplyAnimation(playerid, "BD_FIRE", "Playa_Kiss_03", 4.1, 1, 1, 1, 1, 1, 1);
               ApplyActorAnimation(ActorCJ, "BD_FIRE", "Grlfrd_Kiss_03", 4.1, 0, 0, 0, 0, 0);
               }
               else if(Angle == 270.0) 
               {
               ActorCJ = CreateActor(0, x, y + 1.0, z, 0.0);
               SetActorFacingAngle(ActorCJ, 90.0);
               ApplyAnimation(playerid, "BD_FIRE", "Playa_Kiss_03", 4.1, 1, 1, 1, 1, 1, 1);
               ApplyActorAnimation(ActorCJ, "BD_FIRE", "Grlfrd_Kiss_03", 4.1, 0, 0, 0, 0, 0);
               }
               return 1;
       }
       
    return 0;
   
}
Alguem sabe por que nao acontece nada ??

A parte de angulo da face do jogador nгo sei usar direito ainda


Obrigado
Reply
#2

Olhando seu cуdigo assim por cima, creio que nгo exista nenhum bug.

Vocк jб criou um comando para setar vocк nesse FacingAngle? pois ele sу vai setar se vocк estiver no 90.0, 0.0, 180.0 e etc.. se vocк tiver 180.1, 90.1 nгo vai setar.
Reply
#3

Bem pensado.. Vou criar um comando para isso , ja posto aqui

@edit:

Ajeitei algumas coisas aqui e usei esse comando, ja esta funcionadno normal, valeu !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)