View Full Version : Where do YOU start when scripting a server?

09/08/2014, 10:49 AM
Hi all,

My team and I were discussing how we all start with different aspects of a script when we are writing a gamemode from scratch, and it made me curious as to how you guys start.

What are the first few things you do when writing a new script? (after adding necessary includes etc.) Do you add vehicles first? Player spawns? Class selection? Commands? Write the text content?

Since everyone has quite different styles of scripting, I'm interested to see everyone's responses to this :)

09/08/2014, 10:56 AM
I always start with the login & registration system. And continue on with the tutorial & etc. Then start adding all the features.

09/08/2014, 11:07 AM
It really depends on type of gamemode. Login/Register is needed maybe for public testing, but don't start with it. New gamemode is a lot of testing and login every restart is waste of time for me.

Start with main things of your GM and add things like cars, objects, classes, etc.

09/08/2014, 11:12 AM
You will take particular steps for any server of SAMP you will create, It doesn't really matter if it is RP or RPG, DM or TDM.
First of all, You must have a text document so you will write then up-comming features and modifications, It will make things organized, First of all, Create your admin system which means even registration and login system are included.
After that, You will start creating the features of that server, Let's say if it RP create commands then create House system, Then business vehicles events ect, When you've got all that, You can start making the dialogs of rules, And commands, I don't support to make rules before creating anything in the server.
So technically, There are few points you must know:
Create your admin system first of all.
Never create dialog of rules and commands before you made rules and other features.

09/08/2014, 11:13 AM
Always the OnGameModeInit stuff first. Create the world itself before starting to interact with said world. Then I go over the callbacks in the order a player goes through them. OnPlayerConnect, OnPlayerRequestClass, OnPlayerRequestSpawn, OnPlayerSpawn. Commands are added on the fly as I see fit.

09/08/2014, 11:21 AM
Create your admin system first of all.

RCON is enough! Doing an admin system (like first thing) for gamemode, where you can't know, if it will be successful isn't the right choice.

I did basic admin system before public maybe, but definitely not like first.

09/08/2014, 11:24 AM
I start with puting teams then vehicles then commands :P

09/08/2014, 12:47 PM
Structure is everything in my view, you want to aim for a highly modular script of course there is no script that demonstrates gamemode design better than Scavange&Survive if you do this your design will be a lot easier in the long run.


To me doing this is a no brainer way to start it's really the only way to start now that doesn't mean people don't prefer to design their scripts in other ways that is fine but when you have more than one person a project going modular is the best way and is also my personal preference as well.

09/08/2014, 04:00 PM
• Login/Register system
(• Objects + Vehicles i.e. maps •)
• Basic Admin Commands
• Spawn Classes, OnPlayerSpawn, OnPlayerRequestSpawn
• Before everything, Make a good note on what you're going to do.
You can make your own set of instructions like, if you're going to have an business system, write down all of the features/function that should be done (so you won't forget it).

09/08/2014, 04:26 PM
Interesting variety of responses!

#include <a_samp>

(after adding necessary includes etc.)

Please read before posting in the future.

09/08/2014, 04:38 PM
1) first you have to script your own login and register system (I usually recommend mysql or SQLite for users).
2) create the player spawns (make them dynamic if it's an rp server) else, do them statically.
3) play around with the logging and registering screen by adding textdraws and such thing to show your creativity.
4) create the basic player commands and admin commands
5) if houses system is one of the features that your gamemode gonna have them create it.
6) create business system / prepare your dialogs if it's static.
7) if your gamemode takes place in one of the normal gta cities like Los Santos, try by adding some simple maps around to show that you don't work only on coding.
8) now it's weapons time, create your own guns system.
9) add some jobs and skills and a paycheck system.
10) do an inventory system.

the secret is mainly about taking care of both sides, coding and mapping. If you have done them try by taking care of the UCP and website designing.

Good luck, if you really need help you can contact me as i might get on PC soon ( getting some life back )

09/08/2014, 05:24 PM
Good luck, if you really need help you can contact me as i might get on PC soon ( getting some life back )

Thanks but I wasn't asking for advice, this is a discussion about the different ways that people do things, out of curiosity, since my team and I all do them differently (as stated in the original post).

09/08/2014, 05:30 PM
Thanks but I wasn't asking for advice, this is a discussion about the different ways that people do things, out of curiosity, since my team and I all do them differently (as stated in the original post).

Again look at Scavange&Survive enough said :)

18/08/2014, 12:41 AM
Hope not too old :p

anyway, I start from turning the script into a gamemode, coding the register/login and then seperating the code into files.

18/08/2014, 12:53 AM
I don't think this is the correct forum to put this in.

If anything, the General section of the forums would be the most proper place to put this thread. This forum is more for people requesting help in a given script.

OT: Well, I can't be bothered to write a full GM by myself, so when it comes to filterscripts, I start out with a new.pwn (the one with the provided callbacks), and start with variables, combined with only the callbacks I need (I cut and paste callbacks from the bottom to the top of the script, so that when I'm finished, I can just delete any unneeded callbacks at the end). From there, I add includes as needed, and Color defines as needed, then rinse and repeat. Somewhere in-between I add my script "header."

EDIT: or better yet, put it in the Discussion forum.

18/08/2014, 03:54 AM
I agree with Vince. I always start with OnGameModeInit and add to the callbacks as they are processed by the players. When it comes to applying variables, I make sure that I have completed my login/register/database before I continue. Otherwise you're just constantly adding things to callbacks in any random order and can get yourself confused.

18/08/2014, 08:28 AM
I start with idea, I spend entire night instead of sleeping thinking about what could I add how can I do it and which code can help me. Then I raise my phone and enter forum.sa-mp.com and search every single include I need for my project (why would I script something that's already made and is efficient enoguh) then I "wake up" and enter my blank gamemode and create a few commands for debugging then I enter local server and jump around like a fox thinking about ideas. After those fun moments I enter gamemode include everything needed and start with coding. I start working on something and I jump over next idea and then if I'm pleased with result go back onto first thing I was doing. Summa summarum I have a lot of fun.

27/08/2014, 04:17 PM
Usually if I create a gamemode, it is based off a certain idea. For example, I would have a good idea for a hunger script, so i'll start with that and build a survival server around it. I like to do the features because the other stuff is the same in every server

27/12/2014, 10:24 PM
Bumping this thread to see if anyone else has anything to contribute :)

27/12/2014, 10:42 PM
Hello i start my gamemode scripting about week or week and half ago , i take sa-mp windows server files , so firs i start deleting those city select to make my game mode clear ( i leave some basic staff that helps my to learn ) i am new at samp scriptig so i just do all thing that get to my mind like map some place like prison police stationt and ect. but after this i realise that i need registration and login system to keep going on scripting , cuz without registraion and login system u cant do realy much . as i said i am new at samp scripting so i have alot of problems bugs and not fully working systems , try to look help on this forum some have been solve others i just made list that i need to fix in future cuz i dont realy want to spend a week to solve when i know not much ( so i keep them on future when i have more knowledge) so i keep moving forward to other stuff

27/12/2014, 11:11 PM
HI am new here ;P
usually from the base good luck

26/01/2015, 09:11 PM
Bumping to see if anyone else has any different strategies ^_^

26/01/2015, 09:39 PM
When Im about to script a GM first off Im making myself a small "mindmap"

So Im thinking about whats usefull and what is not, will I need or or will I not?

and so on

26/01/2015, 11:25 PM
Always starts with the MySQL section.