[Tutorial] How to setup your Gamemode
#1

Setting up your gamemode

- Okay, i'm sick and tired off all those "where to put", "where i i insert this" Replys when i try to help people out, I will later on in this tuturial show some of the replys.

Some of you are alot experienced then others.
Haterz Gtfo, if you don't find this useful go troll some elsewhere.

First of all, My own Cutsomized "New.pwn"

Код:
/*

*///================= [ Includes ] ===========================================//

//================= [ Defines ] ==============================================//

//================= [ Forwards ] =============================================//

//================= [ Enums ] ================================================//

//================= [ Symbols ] ==============================================//

//================= [ Callbakcs ] ============================================//

//================= [ Functions ] ============================================//

//================= [ Stocks ] ===============================================//

//================= [ Commands] ==============================================//
That's it, that's all i ever start of when i'm scripting. I will explain each single part And show example code.

This is the first part, this is were i put the credits & includes.
pawn Код:
/*
             Some Fucking Good GM BY MASTASCRTPAHH1337z00r
                        v.0.0.0.0.0.0.0.1 rc 1
*/
//================= [ Includes ] ===========================================//

// This is were i put my includes, pretty obvious.
#include <a_samp>
The second part is were i put my defines.
pawn Код:
//================= [ Defines ] ==============================================//

#define MAX_NOOBS (MAX_PLAYERS)
#define MAX_NOOB_CAKES 10 // How many cakes noobs can have.
The next part is were i put my forwards.

pawn Код:
//================= [ Forwards ] =============================================//
forward GivePlayerNoobCake(playerid);
The next part is regarding enumerators
pawn Код:
//================= [ Enums ] ================================================//
enum NoobInfo
{
     NoobCakes,
}
The next part includes symbols.
pawn Код:
//================= [ Symbols ] ==============================================//
new NoobInfo[MAX_NOOBS][NoobInfo];
The next part is were i put my Callbacks, this is were the Shit happens !

pawn Код:
//================= [ Callbakcs ] ============================================//

public OnPlayerConnect(playerid)
{
     return GivePlayerNoobCake(playerid);
}
Next part is were i put my Functions ( custom public's, needs forwarding. )

pawn Код:
//================= [ Functions ] ============================================//
public GivePlayerNoobCake(playerid)
{
     NoobInfo[playerid][NoobCakes]++;
}
Next part shows were i put my stocks.

pawn Код:
//================= [ Stocks ] ===============================================//
stock GetPlayerNoobCakes(playerid)
{
     return NoobInfo[playerid][NoobCakes];
}
Last but not least, commands.

pawn Код:
//================= [ Commands] ==============================================//
command(givecake, playerid, params[])
{
     return GivePlayerNoobCake(playerid);
}
That's it, there's no real recipe on how to setup your gm, but this way i keep my gm smooth and clean also makes it easier to manage through.

Hall of fame
  1. Quote:
    Originally Posted by IvancheBG
    Посмотреть сообщение
    Ok but where to put all these stuff
  2. Quote:
    Originally Posted by DeLexia
    Посмотреть сообщение
    How and where to put it?
- If you find any comments similar to the one above, please post it and ill put it onto the Hall of fame.
Reply
#2

Its not funny but its just fucking tut
Stop being noob and a kid
Reply
#3

Quote:
Originally Posted by BASITJALIL
Посмотреть сообщение
Its not funny but its just fucking tut
Stop being noob and a kid
Was it supposed to be funny ? No, called irony but if you laughed.. then good for you it cures stress Click me

And, Noob and kid ? Lmao.
Reply
#4

Great information for beginners, very usefull.
Reply
#5

Cameltoe, lol, nice tutorial, can you create cmd for eat cakes? :3
Reply
#6

Its good tut but its annoying that you put "noob" on every fiction
Reply
#7

Quote:
Originally Posted by Stigg
Посмотреть сообщение
Great information for beginners, very usefull.
Exactly, and thanks

Quote:
Originally Posted by Miller
Посмотреть сообщение
Cameltoe, lol, nice tutorial, can you create cmd for eat cakes? :3
Sure no prob, i'll edit the thread any second now

Quote:
Originally Posted by BASITJALIL
Посмотреть сообщение
Its good tut but its annoying that you put "noob" on every fiction
Well, that's the irony of it. I'm sure an overall of at least 50% laughs, so .. I'm happy

This tutorial were wrote for beginners AKA noobs, no offence anyhow.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)