SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 16/02/2019, 01:53 PM   #1
AppleJ
Little Clucker
 
AppleJ's Avatar
 
Join Date: Jan 2019
Location: Flower archipelago
Posts: 4
Reputation: 0
Default CreateDynamicObject disappear on linux server.

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)

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.

Last edited by AppleJ; 16/02/2019 at 04:11 PM.
AppleJ is offline   Reply With Quote
Old 16/02/2019, 09:53 PM   #2
TokicMajstor
Huge Clucker
 
TokicMajstor's Avatar
 
Join Date: Oct 2018
Location: Bosnia And Herzegovina
Posts: 213
Reputation: 10
Default Re: CreateDynamicObject disappear on linux server.

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);
__________________

My work:
-MapTD - GTA SA Map on a TextDraw

https://forum.sa-mp.com/showthread.php?t=671806
TokicMajstor is offline   Reply With Quote
Old 17/02/2019, 03:59 AM   #3
AppleJ
Little Clucker
 
AppleJ's Avatar
 
Join Date: Jan 2019
Location: Flower archipelago
Posts: 4
Reputation: 0
Default Re: CreateDynamicObject disappear on linux server.

Quote:
Originally Posted by TokicMajstor View Post
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 Code:
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 Code:
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 Code:
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.
AppleJ is offline   Reply With Quote
Old 17/02/2019, 04:07 AM   #4
d3Pedro
Huge Clucker
 
Join Date: Apr 2012
Location: darkness
Posts: 321
Reputation: 94
Default Re: CreateDynamicObject disappear on linux server.

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.
d3Pedro is offline   Reply With Quote
Old 17/02/2019, 04:31 AM   #5
AppleJ
Little Clucker
 
AppleJ's Avatar
 
Join Date: Jan 2019
Location: Flower archipelago
Posts: 4
Reputation: 0
Default Re: CreateDynamicObject disappear on linux server.

Quote:
Originally Posted by ConnorW View Post
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 Code:
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 Code:
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.
AppleJ is offline   Reply With Quote
Old 17/02/2019, 05:27 AM   #6
d3Pedro
Huge Clucker
 
Join Date: Apr 2012
Location: darkness
Posts: 321
Reputation: 94
Default Re: CreateDynamicObject disappear on linux server.

objectid is kind of unused var as you're doing it a local one.
try this and tell me if it spawn
pawn Code:
CreateDynamicObject(2218, playerPosX, playerPosY, playerPosZ, 0.0, 0.0, vw, int);
Also try the same code you have but without objectid.
d3Pedro is offline   Reply With Quote
Old 17/02/2019, 06:40 AM   #7
AppleJ
Little Clucker
 
AppleJ's Avatar
 
Join Date: Jan 2019
Location: Flower archipelago
Posts: 4
Reputation: 0
Default Re: CreateDynamicObject disappear on linux server.

Quote:
Originally Posted by ConnorW View Post
objectid is kind of unused var as you're doing it a local one.
try this and tell me if it spawn
pawn Code:
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.
AppleJ is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CreateDynamicObject disappear DavidZvla Scripting Help 6 29/01/2018 09:04 AM
Why when i change my object to CreateDynamicObject server dont works kingforyou Help Archive 6 04/03/2011 08:59 PM
Server wont load plugins for linux on linux server! GrantLea Help Archive 3 24/10/2010 10:55 PM
samp linux server 03r5 doesn't run on 64 bits linux edelcat Server Support 2 08/09/2010 09:22 AM
Anti Car Disappear - it may NEVER disappear! Jochemd Help Archive 4 31/08/2010 08:21 AM


All times are GMT. The time now is 03:40 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.