SA-MP Forums Archive
[GameMode] [GM]Conroy's Server Base v1.1 - Beginner friendly! [UPDATED - 31/03/10] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Gamemode Scripts (https://sampforum.blast.hk/forumdisplay.php?fid=71)
+--- Thread: [GameMode] [GM]Conroy's Server Base v1.1 - Beginner friendly! [UPDATED - 31/03/10] (/showthread.php?tid=133308)

Pages: 1 2


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

Server Base v1.1

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

Features: 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? -Conroy.


Re: [GM]Conroy\\\\\\\'s Server Base v1.0 - Beginner friendly! - armyoftwo - 11.03.2010

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


Re: [GM]Conroy's Server Base v1.0 - Beginner friendly! - Soldan - 11.03.2010

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.


Re: [GM]Conroy's Server Base v1.0 - Beginner friendly! - [MWR]Blood - 30.03.2010

Useful script !


Re: [GM]Conroy's Server Base v1.0 - Beginner friendly! - [MK]Soprano - 30.03.2010

Very good :P


Re: [GM]Conroy's Server Base v1.0 - Beginner friendly! - Conroy - 30.03.2010

First post updated with a fix.


Re: [GM]Conroy's Server Base v1.0 - Beginner friendly! - Mike Garber - 31.03.2010

Why do you use a string for no reason?


Re: [GM]Conroy's Server Base v1.0 - Beginner friendly! - Burridge - 31.03.2010

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?


Re: [GM]Conroy's Server Base v1.0 - Beginner friendly! - Thrarod - 31.03.2010

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


Re: [GM]Conroy's Server Base v1.0 - Beginner friendly! - Conroy - 31.03.2010

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


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

Sorry for double post.

v1.1 released


Re: [GM]Conroy's Server Base v1.1 - Beginner friendly! [UPDATED - 31/03/10] - Burridge - 31.03.2010

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.


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

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.


Re: [GM]Conroy's Server Base v1.1 - Beginner friendly! [UPDATED - 31/03/10] - Burridge - 31.03.2010

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?"


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

Thank you.


Re: [GM]Conroy's Server Base v1.1 - Beginner friendly! [UPDATED - 31/03/10] - ViruZZzZ_ChiLLL - 02.04.2010

Nice, nice!
________
SPICE WEED


Re: [GM]Conroy's Server Base v1.1 - Beginner friendly! [UPDATED - 31/03/10] - Deboss101 - 03.05.2010

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


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

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.


Re: [GM]Conroy's Server Base v1.1 - Beginner friendly! [UPDATED - 31/03/10] - master2die - 23.05.2010

Reupp plz


Re: [GM]Conroy's Server Base v1.1 - Beginner friendly! [UPDATED - 31/03/10] - Thrarod - 23.05.2010

Link dead...