CreateDynamicObject disappear on linux server. -
AppleJ - 16.02.2019
Hello,
I got some problem when using CreateDynamicObject function on my own hosted server (linux CentOS 7).
Basically I tried to create a dynamic object (see the code)
Код:
CMD:testobject(playerid, params[])
{
new objectid;
new Float:playerPosX, Float:playerPosY, Float:playerPosZ;
new int, vw;
GetPlayerPos(playerid, playerPosX, playerPosY, playerPosZ);
int = GetPlayerInterior(playerid);
vw = GetPlayerVirtualWorld(playerid);
objectid = CreateDynamicObject(2218, playerPosX, playerPosY, playerPosZ, 0.0, 0.0, 0.0, vw, int, -1, 300.0,300.0);
return 1;
}
This codes works (the object was created / appeared and shown) in
my PC server / localhost (Windows) but when I use this codes on
my server (linux) the object
appear only for a second and suddenly disappear.
At first I thought it was caused by streamer plugin so I updated it to latest version but the problem still exist.
I already put the required plugin (.so extension) in the server also.
Any answer will be appreciated, thanks.
Additional Note:
- SA-MP server version used: 0.3DL (linux)
- Streamer plugin used: v2.9.4 (latest)
- I also use YSF with latest version: R20-RC4.
Re: CreateDynamicObject disappear on linux server. -
TokicMajstor - 16.02.2019
Show your server.cfg on both Linux and Win. And I think that the create dynamic object has less parameters than that. And search for DestroyDynamicObject(objectid);
Re: CreateDynamicObject disappear on linux server. -
AppleJ - 17.02.2019
Quote:
Originally Posted by TokicMajstor
Show your server.cfg on both Linux and Win. And I think that the create dynamic object has less parameters than that. And search for DestroyDynamicObject(objectid);
|
Windows server.cfg
PHP код:
echo Executing Server Config...
hostname [0.3.DL] Archipelago Roleplay [ALPHA]
gamemode0 test
filterscripts
announce 0
plugins crashdetect sscanf Whirlpool streamer mysql pawncmd.dll YSF_DL MathPlugin
query 1
chatlogging 0
weburl archipelagorp.com
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
logtimeformat [%H:%M:%S]
language English
useartwork 1
sleep 1
mtu 1400
lagcomp on
Linux server.cfg
PHP код:
echo Executing Server Config...
hostname [0.3.DL] Archipelago Roleplay [ALPHA]
gamemode0 test
filterscripts
announce 0
plugins crashdetect.so mysql.so sscanf.so whirlpool.so streamer.so pawncmd.so YSF_DL.so MathPlugin.so
query 1
chatlogging 0
weburl archipelagorp.com
maxnpc 0
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
logtimeformat [%H:%M:%S]
language English
useartwork 1
sleep 1
mtu 1400
lagcomp on
mapname Los Santos
I'm just following the parameters from streamer plugin github documentation about CreateDynamicObject.
PHP код:
CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_OBJECT_SD, Float:drawdistance = STREAMER_OBJECT_DD, areaid = -1, priority = 0)
I don't use any DestroyDynamicObject(objectid) since my purpose just to create a dynamic object.
But please note that this was worked on windows, only in linux it's seems not functionally.
Thanks.
Re: CreateDynamicObject disappear on linux server. -
d3Pedro - 17.02.2019
Are you sure the object doesn't spawn? Maybe it could be object world id, try manually debugging the code to see if things working or not.
Re: CreateDynamicObject disappear on linux server. -
AppleJ - 17.02.2019
Quote:
Originally Posted by ConnorW
Are you sure the object doesn't spawn? Maybe it could be object world id, try manually debugging the code to see if things working or not.
|
the object is spawned, but only
a second then disappear.
What makes me confused is, this one works well in windows but on linux those condition happened.
I already try to not use parameter after Float:rz (worldid, interiorid, etc) but the problem still happened.
PHP код:
objectid = CreateDynamicObject(2218, playerPosX, playerPosY, playerPosZ, 0.0, 0.0, 0.0);
I also try to manually insert the vw and interior id (not using GetPlayerInterior(playerid) & GetPlayerVirtualWorld(playerid)), but the problem still happened.
PHP код:
objectid = CreateDynamicObject(2218, playerPosX, playerPosY, playerPosZ, 0.0, 0.0, 0.0, 0, 0);
Then I tried to use
CreateObject, the object finally not disappear (like in windows), but of course CreateObject only limit me to 1000 (?) which will makes problem in the future.
Re: CreateDynamicObject disappear on linux server. -
d3Pedro - 17.02.2019
objectid is kind of unused var as you're doing it a local one.
try this and tell me if it spawn
pawn Код:
CreateDynamicObject(2218, playerPosX, playerPosY, playerPosZ, 0.0, 0.0, vw, int);
Also try the same code you have but without objectid.
Re: CreateDynamicObject disappear on linux server. -
AppleJ - 17.02.2019
Quote:
Originally Posted by ConnorW
objectid is kind of unused var as you're doing it a local one.
try this and tell me if it spawn
pawn Код:
CreateDynamicObject(2218, playerPosX, playerPosY, playerPosZ, 0.0, 0.0, vw, int);
Also try the same code you have but without objectid.
|
I tried without objectid and now the object even didn't spawn. Previous one (with objectid) the object did spawn but disappear after a second. I already tried this on a clean script but the problem still happened.