"CreateDynamicActor" -
darkwing - 11.04.2019
How can I use the "CreateDynamicActor" symbol for my server? I tried many streamer plugin version but it didn't work. Example: SetDynamicActorPos didn't work. What should I do?
Re: "CreateDynamicActor" -
xRadical3 - 11.04.2019
You first should create a var for the actor..
Now CreateDynamicActor symbol take OnGameModeInit:
pawn Code:
public OnGameModeInit()
{
MyActor = CreateDynamicActor(modelid, Float:x, Float:y, Float:z, Float:r);
//(modelid = skin id, float x, float y, float z, r = angle)
return 1;
}
And how to use SetDynamicActorPos:
pawn Code:
SetDynamicActorPos(MyActor, Float:x, Float:y, Float:z);
Re: "CreateDynamicActor" -
darkwing - 12.04.2019
I got error
Code:
undefined symbol "CreateDynamicActor"
How can I fix this error?
Re: "CreateDynamicActor" -
RenanMsV - 12.04.2019
Did you include the streamer ?
#include <streamer>
Re: "CreateDynamicActor" -
darkwing - 12.04.2019
Which version of streamer should I use?
Re: "CreateDynamicActor" -
RenanMsV - 12.04.2019
the newest
https://github.com/samp-incognito/sa...ses/tag/v2.9.4
Re: "CreateDynamicActor" -
darkwing - 12.04.2019
SetDynamicActorPos doesn't work at OnPlayerUpdate. Actor disappears.
Re: "CreateDynamicActor" -
SiaReyes - 12.04.2019
Quote:
Originally Posted by darkwing
SetDynamicActorPos doesn't work at OnPlayerUpdate. Actor disappears.
|
SetDynamicActorPos should be put inside OnGamemodeInit()
Example
pawn Code:
new MyActor[2];
public OnGameModeInit()
{
// Actor 1 = MyActor[0]
MyActor[0] = CreateDynamicActor(23, 0.0, 0.0, 0.0);
SetDynamicActorPos(MyActor[0], 0.0, 0.0, 0.0);
// Actor 2 = MyActor[1]
MyActor[1] = CreateDynamicActor(23, 0.0, 0.0, 0.0);
SetDynamicActorPos(MyActor[1], 0.0, 0.0, 0.0);
return 1;
}
Re: "CreateDynamicActor" -
NaS - 12.04.2019
Quote:
Originally Posted by SiaReyes
SetDynamicActorPos should be put inside OnGamemodeInit()
Example
pawn Code:
new MyActor[2];
public OnGameModeInit() { // Actor 1 = MyActor[0] MyActor[0] = CreateDynamicActor(23, 0.0, 0.0, 0.0); SetDynamicActorPos(MyActor[0], 0.0, 0.0, 0.0);
// Actor 2 = MyActor[1] MyActor[1] = CreateDynamicActor(23, 0.0, 0.0, 0.0); SetDynamicActorPos(MyActor[1], 0.0, 0.0, 0.0);
return 1; }
|
Why though? You already set the coords in CreateDynamicActor, so there's no need to set it again. It won't do anything.
The reason it might disappear is that the actual Actor gets recreated when using SetDynamicActorPos. This takes about 1-2 seconds depending on the update rate of the streamer and server.
If you call it very often in a short time (eg. OnPlayerUpdate) it will constantly be recreated, not allowing it to spawn in actually.
Use it less frequently.
Re: "CreateDynamicActor" -
xRadical3 - 12.04.2019
Quote:
Originally Posted by SiaReyes
SetDynamicActorPos should be put inside OnGamemodeInit()
Example
pawn Code:
new MyActor[2];
public OnGameModeInit() { // Actor 1 = MyActor[0] MyActor[0] = CreateDynamicActor(23, 0.0, 0.0, 0.0); SetDynamicActorPos(MyActor[0], 0.0, 0.0, 0.0);
// Actor 2 = MyActor[1] MyActor[1] = CreateDynamicActor(23, 0.0, 0.0, 0.0); SetDynamicActorPos(MyActor[1], 0.0, 0.0, 0.0);
return 1; }
|
When CreateDynamicActor symbol create the actor and set actor position why use the SetDynamicActorPos symbol after that?
Quote:
Originally Posted by darkwing
SetDynamicActorPos doesn't work at OnPlayerUpdate. Actor disappears.
|
What do you want to make?
Re: "CreateDynamicActor" -
darkwing - 12.04.2019
When "if(PlayerData[playerid][petTest] == 1)" i want to use SetDynamicActorPos at OnPlayerUpdate. Like actor following system.
Re: "CreateDynamicActor" -
darkwing - 16.04.2019
++++
Re: "CreateDynamicActor" -
FireBoy89 - 16.04.2019
You should use FCNPC plugin then, Here is the link for you
https://github.com/ziggi/FCNPC/releases
Re: "CreateDynamicActor" -
Logic_ - 18.04.2019
Actors are static. NPC are bots. Use the one that is of your use. If you want to make moving peds or vehicles, use NPCs. If you want to create static or primarily non moving, then use actors.