help Expanding on Game mode changer
#7

First of all: Thanks for the compliment in the PM you've sent me. ^^

Okey, so lets start with the code:

- This is the Filterscript you need:
pawn Код:
#include <a_samp>
#include <dini>

public OnFilterScriptInit()
{
    SetTimer("GMswitch", 30000, 1);
    return 1;
}

forward GMswitch();
public GMswitch()
{
    new gm=strval(dini_Get("GameMode.txt", "LoadNext"));
    switch(gm)
    {
        case 0: { SendRconCommand("changemode FALLOUT"); gm++; }
        case 1: { SendRconCommand("changemode ANOTHER"); gm++; }
        case 2: { SendRconCommand("changemode ANOTHERONE"); gm++; }
        case 3: { SendRconCommand("changemode ONEMORE"); gm++; }
        case 4: { SendRconCommand("changemode DUNNOOOOO"); gm=0; }
    }
    new msg[10]; format(msg, 10, "%d", gm);
    dini_Set("GameMode.txt", "LoadNext", msg);
    return 1;
}
And as you can see, we have at the top #include <dini>. We need the include, to read the next gamemode out of a file.
You have to download "dini" (Just search it on ******).

Before you load the filterscript, you have to create at: /scriptfiles/ a file called: GameMode.txt

When you have done this, just change the GameModes to your ones, and you are done.

If you have any questions, just let me know, and I will help you.


Greetings,
Jeffry
Reply


Messages In This Thread
help Expanding on Game mode changer - by Tommie1331 - 08.10.2010, 22:49
Re: help Expanding on Game mode changer - by WillyP - 08.10.2010, 22:50
Re: help Expanding on Game mode changer - by Sascha - 08.10.2010, 22:51
Re: help Expanding on Game mode changer - by WillyP - 08.10.2010, 22:59
Re: help Expanding on Game mode changer - by Tommie1331 - 08.10.2010, 23:00
Re: help Expanding on Game mode changer - by Tommie1331 - 09.10.2010, 12:36
Re: help Expanding on Game mode changer - by Jeffry - 09.10.2010, 12:41

Forum Jump:


Users browsing this thread: 2 Guest(s)