Actor problem
#1

Hello everybody, I have unknown problem with actors, when I want to create actor via command it won`t show up, here is the code:
PHP код:
CMD:actor(playeridparams[])
{
    
CreateActor(4, -366.2009881539.18005375.5608970.0);
    
SetPlayerPos(playerid, -366.2009881539.18005375.560897);
    return 
1;

Reply
#2

https://sampwiki.blast.hk/wiki/CreateActor
Reply
#3

Quote:
Originally Posted by justice96
Посмотреть сообщение
I read that twice. But actor won`t show.
Reply
#4

Your code is right i tested it on my localhost , idk what can be the problem , maybe u tried to set him up on an interior or virtualworld or something check that out maybe that's the problem

Код:
new Actor;


CMD:actor(playerid, params[]) 
{ 
    Actor = CreateActor(4, -366.200988, 1539.180053, 75.560897, 0.0); 
    SetActorVirtualWorld(Actor, 0);
    SetPlayerPos(playerid, -366.200988, 1539.180053, 75.560897); 
    return 1; 
}
idk try this
Reply
#5

"When creating an actor with CreateActor, you specify it's position. You do not need to use this function unless you want to change its position later."

https://sampwiki.blast.hk/wiki/CreateActor
Reply
#6

Quote:
Originally Posted by FreAkeD
Посмотреть сообщение
"When creating an actor with CreateActor, you specify it's position. You do not need to use this function unless you want to change its position later."

https://sampwiki.blast.hk/wiki/CreateActor
He's using SetPlayerPos, which means that he set his player's location the same as the actor's one. The function to set the position of actor is SetActorPos, so the problem is not in SetPlayerPos.

Quote:
Originally Posted by Sanady
Посмотреть сообщение
I read that twice. But actor won`t show.
You should try to define the actor first:
Код:
new Actor1;
CMD:actor(playerid, params[]) 
{ 
    Actor1 = CreateActor(4, -366.200988, 1539.180053, 75.560897, 0.0); 
    SetPlayerPos(playerid, -366.200988, 1539.180053, 75.560897); 
    return 1; 
}
Reply
#7

Quote:
Originally Posted by Darkwood17
Посмотреть сообщение
He's using SetPlayerPos, which means that he set his player's location the same as the actor's one. The function to set the position of actor is SetActorPos, so the problem is not in SetPlayerPos.



You should try to define the actor first:
Код:
new Actor1;
CMD:actor(playerid, params[]) 
{ 
    Actor1 = CreateActor(4, -366.200988, 1539.180053, 75.560897, 0.0); 
    SetPlayerPos(playerid, -366.200988, 1539.180053, 75.560897); 
    return 1; 
}
I did that too. Also it`s not working. I don`t know why it don`t want to spawn it.
Reply
#8

Does the actor system have some tricks that should I know about?
Reply
#9

try to set the actor's virtual world then see.
Reply
#10

Be sure you return 0 onplayerconnect for actor and same for onplayers class request return it 0 if player's actor
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)