Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

GUIDE : Creating your first BETA Gamemode

$
0
0
Hello everybody,
Today I want to share some usefull information for beginners.

As most of you know,BETA Server is a testing server.

Why do we need BETA server for testing? We could just do it on my own well scripted server (dumbass probro :P )

^^Wrong Question,If you test some filterscript(etc) on your well scripted server chances are you might screw your server up.

Without futher ado,Lets start.

First we Open Pawno & Click New.

You need to delete useless call backs which you don't need in your beta server (Try not to make your beta server much "Complicated".)

It should be like this :-


PHP Code:

// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>



main()
{
    print(
"\n----------------------------------");
    print(
" Blank Gamemode by your name here");
    print(
"----------------------------------\n");
}

#endif

public OnGameModeInit()
{
    
// Don't use these lines if it's a filterscript
    
SetGameModeText("Blank Script");
    
AddPlayerClass(01958.37831343.157215.3746269.1425000000);
    return 
1;
}
public 
OnPlayerConnect(playerid)
{
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/mycommand"cmdtexttrue10) == 0)
    {
        
// Do something here
        
return 1;
    }
    return 
0;


[GETTING IT READY FOR TESTING]

Now we edit some basic things in the code :-
PHP Code:

/* Your BETA Gamemode*/
#include <a_samp> //You need to add this line,without it,you can't do anything.



main()
{
    print(
"\n----------------------------------");
    print(
" BETA SERVER BY [YOUR NAME]"); //Your name
    
print("----------------------------------\n");
}


public 
OnGameModeInit()
{
    
SetGameModeText("Beta Server"); //your game mode text
    
AddPlayerClass(01958.37831343.157215.3746269.1425000000); //THIS line is important,
    
return 1//if you want to change spawn point,GO to your desired location in game and /save there you get your coordinates in GTa sa User files > Savedpositions.
}
public 
OnPlayerConnect(playerid)
{
  
GameTextForPlayer(playerid,"~w~ Welcome to [your name] BETA SERVER!",3000,4);
 
//OR 
  
SendClientMessage(playerid,-1,"Welcome to [your] beta SERVER");
    return 
1;
}

public 
OnPlayerCommandText(playeridcmdtext[]) //your first command for beta server
{
    if (
strcmp("/help"cmdtexttrue10) == 0)
    {
        
SendClientMessage(playerid,-1,"No Help in testing server"); //anything you want
        
return 1;
    }
    return 
0;
}
/***********************The end of your Gamemode**************************************/ 



Images :- http://imgur.com/a/h8H62

This is the BETA Server you should use for testing your codes.As it doesn't have much to screw up :D

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>