About actors -
AlexMSK - 05.11.2017
Hello, is there possible to make something like
PHP код:
#include <foreach>
new ActorCJ[6];
public OnGameModeInit()
{
ActorCJ[0] = CreateActor(0, 0.0, 0.0, 3.0, 0.0);
ActorCJ[1] = CreateActor(0, 0.0, 0.0, 3.0, 0.0);
ActorCJ[2] = CreateActor(0, 0.0, 0.0, 3.0, 0.0);
ActorCJ[3] = CreateActor(0, 0.0, 0.0, 3.0, 0.0);
ActorCJ[4] = CreateActor(0, 0.0, 0.0, 3.0, 0.0);
ActorCJ[5] = CreateActor(0, 0.0, 0.0, 3.0, 0.0);
ActorCJ[6] = CreateActor(0, 0.0, 0.0, 3.0, 0.0);
for(new i = 0; i < 6; i ++) {
ApplyActorAnimation(i, "DEALER", "DEALER_IDLE", 4.0, 1, 0, 0, 0, 0, 1);
}
return 1;
}
??
Re: About actors -
AlexMSK - 05.11.2017
bump anyone?
Re: About actors -
Dayrion - 05.11.2017
Did you tried?
Re: About actors -
TomRedlake - 05.11.2017
Try adding these and replace:
Код:
for(new i; i < MAX_ACTORS; i++) {
ApplyActorAnimation(i, "DEALER", "DEALER_IDLE", 4.0, 1, 0, 0, 0, 0, 1);
}
Re: About actors -
Mencent - 05.11.2017
Hello!
When you want to do this, then like this:
PHP код:
#include <foreach>
new ActorCJ[7];
public OnGameModeInit()
{
ActorCJ[0] = CreateActor(0, 0.0, 0.0, 3.0, 0.0);
ActorCJ[1] = CreateActor(0, 0.0, 0.0, 3.0, 0.0);
ActorCJ[2] = CreateActor(0, 0.0, 0.0, 3.0, 0.0);
ActorCJ[3] = CreateActor(0, 0.0, 0.0, 3.0, 0.0);
ActorCJ[4] = CreateActor(0, 0.0, 0.0, 3.0, 0.0);
ActorCJ[5] = CreateActor(0, 0.0, 0.0, 3.0, 0.0);
ActorCJ[6] = CreateActor(0, 0.0, 0.0, 3.0, 0.0);
for(new i = 0; i < 7; i ++) {
ApplyActorAnimation(i, "DEALER", "DEALER_IDLE", 4.0, 1, 0, 0, 0, 0, 1);
}
return 1;
}
Because you use 0-6 (0,1,2,3,4,5,6 = 7) but you defined it with 6.
I hope you understand what I mean. ^^
Re: About actors -
AjaxM - 05.11.2017
PHP код:
#define MAX_ACTORS 7
new ActorCJ[MAX_ACTORS];
public OnGameModeInit()
{
ActorCJ[0] = CreateActor(0, 0.0, 0.0, 3.0, 0.0);
ActorCJ[1] = CreateActor(0, 0.0, 0.0, 3.0, 0.0);
ActorCJ[2] = CreateActor(0, 0.0, 0.0, 3.0, 0.0);
ActorCJ[3] = CreateActor(0, 0.0, 0.0, 3.0, 0.0);
ActorCJ[4] = CreateActor(0, 0.0, 0.0, 3.0, 0.0);
ActorCJ[5] = CreateActor(0, 0.0, 0.0, 3.0, 0.0);
ActorCJ[6] = CreateActor(0, 0.0, 0.0, 3.0, 0.0);
for(new i = 0; i < MAX_ACTORS; i ++)
{
ApplyActorAnimation(i, "DEALER", "DEALER_IDLE", 4.0, 1, 0, 0, 0, 0, 1);
}
return 1;
}
Though, you won't need foreach for this loop.
Re: About actors -
Sasino97 - 07.11.2017
ApplyActorAnimation(
ActorCJ[i], "DEALER", "DEALER_IDLE", 4.0, 1, 0, 0, 0, 0, 1);