[GameMode] [GM]Conroy's Server Base v1.1 - Beginner friendly! [UPDATED - 31/03/10]
#1

Server Base v1.1

New to scripting? Need a head start? This is the base for you!

Features:
  • Login/Register system
  • User data saving system
  • Administrator system
  • Bank system
Also includes some basic commands such as kick, ban, setplayeradmin (for more commands, use /commands in game).

There's no bugs, although if you happen to come across one, let me know.

Before you run your server, open the .pwn file and look for line 47 (new ServerName[48] = "SERVER NAME"; // Change SERVER NAME to your server's name!), simply do what the comment says.

Compile the .pwn.

Open server.cfg, search for "gamemode0", replace that line with "gamemode0 BaseServer 1" with no quotes.

Download: http://www.mediafire.com/?ps2clozy6yji7ab

What's new in v1.1?
  • Player colours (Admins are red, Regulars are orange and Members are white)
  • Bank system (Also includes stats about the players transactions, use /bank for all available commands)
-Conroy.
Reply
#2

It\'s really good, that other people help beginners out!
Reply
#3

Good job Conroy! Seems a good script!

Compiled no problem, no warnings, and I'm about to test it.


+1

Soldan

EDIT - Tested and Confirmed! Everything is there and works as cited.
Reply
#4

Useful script !
Reply
#5

Very good :P
Reply
#6

First post updated with a fix.
Reply
#7

Why do you use a string for no reason?
Reply
#8

To save using one whole string, just do the following:

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SendClientMessage(playerid, COLOR_RED, "You have been killed, therefore you have lost your money.");
    ResetPlayerMoney(playerid);
    return 1;
}
Other than that, good work, will certainly help new people out. Added to the Gamemode Board Overview post, that's pinned in this forum.

Whoa, dude, why so many useless 256 strings in there?
Reply
#9

I think he didnt want to count the letters Also what does bankmoney do?
Reply
#10

The bank money will be put into use in v2.0. It doesn't do anything at the moment.

About the strings, I know I have a few wasted ones out there, it's a habit I've gotten into. :P
Reply
#11

Sorry for double post.

v1.1 released
Reply
#12

Well done for fixing some errors I saw in 1.0, however.

pawn Код:
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase

Header size:      1468 bytes
Code size:      45956 bytes
Data size:      29572 bytes
Stack/heap size:   16384 bytes; estimated max. usage=4394 cells (17576 bytes)
Total requirements:  93380 bytes
May I suggest you read ******' 256 strings topic? http://forum.sa-mp.com/index.php?topic=78026.0

For instance:
pawn Код:
stock PlayerName(playerid) {
 new name[255];
 GetPlayerName(playerid, name, 255);
 return name;
}
Whoa! Why is name set at 255? The max name for SA-MP is 24.

pawn Код:
stock PlayerName(playerid) {
 new name[MAX_PLAYER_NAME];
 GetPlayerName(playerid, name, MAX_PLAYER_NAME);
 return name;
}
Will do the trick. I also noticed in some of your commands where you've added a name define, they're at 256!

I went through your whole code, and I've fixed all of them, there's also no longer that warning about memory usage. I'm not trying to be an ass either, I'm trying to help you out, so please don't take this the wrong way. If you want me to upload my version, just ask. I'd say it'd be better for you to do it though, as otherwise you'll never learn.
Reply
#13

Sure, go ahead, I don't spend a lot of time doing this, so I don't bother about string lengths, I just put them all to 256.
Reply
#14

http://daniel-burridge.com/files/BaseServer.pwn - Here you go. It's not tested I'm afraid, as I'm rather tired. Which may also induce some mistakes. O_o

Quote:
Originally Posted by Conroy
Sure, go ahead, I don't spend a lot of time doing this, so I don't bother about string lengths, I just put them all to 256.
Oh! Fair enough, either way though, you'd only have people in here who DON'T search going "y i gut dis err0r?"
Reply
#15

Thank you.
Reply
#16

Nice, nice!
________
SPICE WEED
Reply
#17

where i put file? how to install {{total noob}}
Reply
#18

Put the file in the Gamemodes folder, open it and compile. Then open server.cfg and add ServerBase to the Gamemode line. Start the server and enjoy.
Reply
#19

Reupp plz
Reply
#20

Link dead...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)