createobject not shows
#1

Hello guys! As you can see in the title my objects are not showing, I mean the objects, created with CreateObject(...)!
All of my dynamic objects are loaded. This bug only happens when I restart the server using the function GameModeExit(); If I restart the server trough my server host control panel it doesn't happen!
IT ONLY HAPPENS TO OBJECTS, CREATED BY THE FUCNTION "CREATEOBJECT"!!!
Reply
#2

can you post the section specified with objects in GameModeExit();?
Reply
#3

If you use both dynamic object and the ordinary ones it can easily bug out because dynamics are always created and destroyed where as the ordinary ones are always there with the same object id and from what I remember if there isn't enough static ids they might end up not being created, overall using both is tricky sometimes.
Reply
#4

I'm using the ordinary objects only for floors, because when player respawns the dynamic object doesn't load at the time, it loads later and I decided to make it ordinary to prevent this bug!
Reply
#5

Quote:
Originally Posted by thefirestate
Посмотреть сообщение
If you use both dynamic object and the ordinary ones it can easily bug out because dynamics are always created and destroyed where as the ordinary ones are always there with the same object id and from what I remember if there isn't enough static ids they might end up not being created, overall using both is tricky sometimes.
Unlikely as you have to create a lot of static objects to even cause the total amount to reach 1000.
By default the max. number of visible dynamic objects is 600, which leaves room for 400 global objects.

And even if you exceed the 400, global objects have priority over dynamic objects since they are created first and for every player. If you create too many global objects in OnGameModeInit the only thing that can happen is that less dynamic objects will be shown, but not global ones.


Do you create the objects in the gamemode or in a filterscript?
It sounds like a problem with a FS that does not properly reload after a game mode restart.
Reply
#6

Some scripters that have full control over the script since the very beginning do have control over that and are able to make this however if it's not a script you're too familiar with I believe it's going to be easier if you just freeze the player for some time until the objects load.
Reply
#7

Quote:
Originally Posted by NaS
Посмотреть сообщение
Unlikely as you have to create a lot of static objects to even cause the total amount to reach 1000.
By default the max. number of visible dynamic objects is 600, which leaves room for 400 global objects.

And even if you exceed the 400, global objects have priority over dynamic objects since they are created first and for every player. If you create too many global objects in OnGameModeInit the only thing that can happen is that less dynamic objects will be shown, but not global ones.


Do you create the objects in the gamemode or in a filterscript?
It sounds like a problem with a FS that does not properly reload after a game mode restart.
All of my objects are in the gamemode under OnGameModeInit and I'm sure all of the objects are not more than 100-200. Any idea?
Reply
#8

Quote:
Originally Posted by Kraeror
Посмотреть сообщение
All of my objects are in the gamemode under OnGameModeInit and I'm sure all of the objects are not more than 100-200. Any idea?
Instead of making them global you could also toggle them static using Streamer_ToggleItemStatic.
That will make them visible at all times like global objects, but only in their virtual worlds/interiors. That should be even better than global objects (which are visible in all virtual worlds and interiors).

However I suppose there's still an issue since objects shouldn't just disappear. However I'm not sure why it happens, maybe you could post some code that seems relevant?

Do you have any filterscripts that use objects, even if those don't seem to be related to the ones that don't work?
Reply
#9

where did you place your CreateObject code? In FilterScript or in gamemode? If you have problems that players are falling down when they enter custom interior - freeze them for few seconds and let map load
Reply
#10

I don't have any filterscript in my server. Here is my code. I tried what you said NaS and it still doesn't work!
Code:
PHP код:
ssnow2 CreateObject(83521637.382811481.335947.89840,   0.000000.000000.00000);
    
SetObjectMaterial(ssnow213915"libertyhi3""mp_snow"0xFFFFFFFF);
    
ssnow3 CreateObject(79991637.390631355.460947.88280,   0.000000.000000.00000);
    
SetObjectMaterial(ssnow313915"libertyhi3""mp_snow"0xFFFFFFFF);
    
Streamer_ToggleItemStatic(STREAMER_TYPE_OBJECTssnow21);
    
Streamer_ToggleItemStatic(STREAMER_TYPE_OBJECTssnow31); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)