Actor problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Actor problem (
/showthread.php?tid=598355)
Actor problem -
Sanady - 11.01.2016
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(playerid, params[])
{
CreateActor(4, -366.200988, 1539.180053, 75.560897, 0.0);
SetPlayerPos(playerid, -366.200988, 1539.180053, 75.560897);
return 1;
}
Re: Actor problem - justice96 - 11.01.2016
https://sampwiki.blast.hk/wiki/CreateActor
Re: Actor problem -
Sanady - 11.01.2016
Quote:
Originally Posted by justice96
|
I read that twice. But actor won`t show.
Re: Actor problem -
AlexuTzVs - 11.01.2016
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
Re: Actor problem -
FreAkeD - 11.01.2016
"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
Re: Actor problem -
Darkwood17 - 11.01.2016
Quote:
Originally Posted by FreAkeD
|
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;
}
Re: Actor problem -
Sanady - 11.01.2016
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.
Re: Actor problem -
Sanady - 13.01.2016
Does the actor system have some tricks that should I know about?
Re: Actor problem -
IceBilizard - 13.01.2016
try to set the actor's virtual world then see.
Re: Actor problem -
jlalt - 13.01.2016
Be sure you return 0 onplayerconnect for actor and same for onplayers class request return it 0 if player's actor