CreateDynamicObject disappear on linux server.
#1

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.
Reply
#2

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);
Reply
#3

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.DLArchipelago 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.DLArchipelago 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(modelidFloat:xFloat:yFloat:zFloat:rxFloat:ryFloat:rzworldid = -1interiorid = -1playerid = -1Float:streamdistance STREAMER_OBJECT_SDFloat:drawdistance STREAMER_OBJECT_DDareaid = -1priority 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.
Reply
#4

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.
Reply
#5

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(2218playerPosXplayerPosYplayerPosZ0.00.00.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(2218playerPosXplayerPosYplayerPosZ0.00.00.000); 
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.
Reply
#6

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.
Reply
#7

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)