[Question] Object - FS or GM
#1

Hello , i have a question

it is better to put the objects into the gamemode or use them as filterscript? Otherwise, the gamemode is heavier.

Thanks
Reply
#2

I prefer gamemodes cuz you can move gate's etc.
Reply
#3

Yes, but the CreateDynamicObject is more. It's better into the gamemode? I speak of static ones.
Reply
#4

i once had all my objects (especially static ones, like fences, doors etc) in the gamemode, but it proved to be better as filterscript which dynamically loads all desired maps.
if you reload a filterscript using dynamicobjects, then you dont even need to destroy them all before reload - the streamer takes care for those leaked adresses - updating .txt or .map files is easier than recompiling a script/restarting the server, so my suggestion goes to a filterscript.
oh, you might convert all static objects to streamed ones, its more stable once you reach the maximum objects' amont (lets assume you ONLY use streamed objects, then you CAN use 1000 objects, but you should prefer like 800 as default settings, i had weird crashes when displaying >800 objects)
pawn Код:
public OnFilterScriptInit(){
Streamer_VisibleItems(STREAMER_TYPE_OBJECT,800);
Reply
#5

I once had all the objects inside FS. It was an stunt server. I used a streamer, but as soon as server had about 15 players the objects started flashing. It was not the streamers fault.
Reply
#6

ok, so if I make a filterscript with 5000 object , I have to do:

Код:
public OnFilterScriptInit()
{
Streamer_VisibleItems(STREAMER_TYPE_OBJECT,5000);
return 1;
}
But if i have for example 50 players online can be a problem? as said: Forever Alone

Thanks for replies (rep+)
Reply
#7

Quote:
Originally Posted by PryX0G3n
Посмотреть сообщение
ok, so if I make a filterscript with 5000 object , I have to do:

Код:
public OnFilterScriptInit()
{
Streamer_VisibleItems(STREAMER_TYPE_OBJECT,5000);
return 1;
}
But if i have for example 50 players online can be a problem? as said: Forever Alone

Thanks for replies (rep+)
Streamer_VisibleItems sets how many objects can be created at once. The limit for SA:MP 0.3e is 1000 but I wouldn't use more than 500.

Streamer_VisibleItems(STREAMER_TYPE_OBJECT, 500);

Also, I would create an include for the objects, hook OnGameModeInit and include it in the mode.
Reply
#8

okay this way? http://pastebin.com/wxZHY2ba
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)