SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 10/10/2019, 11:27 AM   #1
PepeTheFrog
Little Clucker
 
Join Date: Dec 2016
Posts: 13
Reputation: 1
Question Where to put CreateDynamicObjects? In filterscripts or Game modes?

Hi, i've been creating a map, I wonder where I should put the code? Is it in filterscript or game mode?
PepeTheFrog is offline   Reply With Quote
Old 10/10/2019, 11:29 AM   #2
Hazon
Big Clucker
 
Hazon's Avatar
 
Join Date: May 2018
Location: Who cares ?
Posts: 139
Reputation: 18
Default Re: Where to put CreateDynamicObjects? In filterscripts or Game modes?

Objects in OnGameModeInit and RemoveBuilding in OnPlayerConnect.
Hazon is offline   Reply With Quote
Old 10/10/2019, 11:53 AM   #3
Kwarde
High-roller
 
Kwarde's Avatar
 
Join Date: Nov 2009
Location: The Netherlands
Posts: 2,443
Reputation: 1620
Default Re: Where to put CreateDynamicObjects? In filterscripts or Game modes?

Doesn't matter. Filterscripts load before the gamemode. So the only difference between creating them in a filterscript or in the gamemode is when the objects get created. And since starting up the server doesn't take that much time, it doesn't matter.
Objects required for your gamemode are best put inside your gamemode. Filterscripts that have a map for the filterscript should be right in there.

Quote:
Originally Posted by Hazon View Post
Objects in OnGameModeInit and RemoveBuilding in OnPlayerConnect.
Yes. Sidenote on that:
When removing the same object for a player, they will crash. Commonly, players crash when reconnecting (due to situations like a server restart or loosing the connection) to the server because the server removes buildings on OnPlayerConnect.
Kwarde 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
How many game modes are in sa-mp? amirab Everything and Nothing 26 22/09/2014 05:38 PM
Help game modes aplle Server Support 2 28/04/2012 05:44 PM
help switching game modes Tommie1331 Help Archive 12 08/10/2010 11:21 PM
Game Modes LumpyCustard General 2 24/06/2010 02:11 AM
Installing New Game Modes DeltaAirlines12 Server Support 1 09/06/2009 04:59 AM


All times are GMT. The time now is 08:31 PM.


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