• Welcome to Vice City Multiplayer.
 

Extra config options!

Started by goudewup, February 17, 2010, 06:00:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

goudewup

Heya, here i am with my first release!
It is a quite simple script, but hey atleast it's something.  :-*

What is it?
This script creates a extra file called config.ini in wich are a lot more options for you that you can change without having to touch pawno!

Download & Installation
You need to download the dini and dutils includes (credits to Dracoblue!) and put these in your pawn/includes folder.
Then you put this code at OnGameModeInit()

         if(dini_Exists("config.ini"))
{
  SetGameModeText(dini_Get("config.ini", "name"));
ShowPlayerMarkers(dini_Bool("config.ini", "playermarkers"));
SetWorldTime(dini_Int("config.ini", "time"));
SetGravity(dini_Int("config.ini", "gravity"));
SetGamespeed(dini_Int("config.ini", "gamespeed"));
SetWaterLevel(dini_Float("config.ini", "waterlevel"));
PerfectHandling(dini_Bool("config.ini", "perfecthandling"));
Flyingcars(dini_Bool("config.ini", "flycars"));
Taxiboostjump(dini_Bool("config.ini", "taxijump"));

}
else{
dini_Create("config.ini");
print("config.ini created");
dini_Set("config.ini", "name", "changeme");
SetGameModeText("changeme");
dini_BoolSet("config.ini", "playermarkers", 1);
ShowPlayerMarkers(1);
dini_IntSet("config.ini", "time", 12);
SetWorldTime(12);
dini_IntSet("config.ini", "gravity", 100);
SetGravity(100);
dini_IntSet("config.ini", "gamespeed", 100);
SetGamespeed(100);
dini_FloatSet("config.ini", "waterlevel", 6.0);
SetWaterLevel(6.0);
dini_BoolSet("config.ini", "perfecthandling", 0);
PerfectHandling(0);
dini_BoolSet("config.ini", "flycars", 0);
Flyingcars(0);
dini_BoolSet("config.ini", "taxijump", 0);
Taxiboostjump(0);
}

And then you're done!

Usage
All you have to do is run your server and you're done!
Altough you most likely want to change some things in the config, for the changes to change effect you need to restart your server.

Hope ya like it! ;)

thijn

I kinda like it, Although making just

Taxiboostjump(1);
SetGravity(100);
etc.

at the gamemode init is abit shoter.

For newbs it nice though ;)


goudewup

yes but then you have to edit your script in order to turn them on or off.. ;)

thijn

editing script or editing an ini file is, in my opinion, the same


goudewup

the one can be done with notepad the other needs pawno  ::)

[AoD]NC

#5
Quote from: goudewup on February 22, 2010, 05:00:53 PM
the one can be done with notepad the other needs pawno  ::)

Isnt pawno only for coloring the syntax and for easier scripting?

@Boss: aww thx for info :p.

Boss

Quote from: [AoD]NC on February 22, 2010, 05:07:55 PM
Isnt pawno only for coloring the syntax and for easier scripting?
It does also have a built-in compiler. You can write pawn code in notepad, but you will then have to manually compile it through the "external" compiler.