SA-MP Forums Archive
[FilterScript] Mode Changer - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Mode Changer (/showthread.php?tid=197063)



Mode Changer - Kidemo - 07.12.2010

This FilterScript Basicly makes sure you dont need to use a rcon admin changing the gamemode if you own a mini missions server.


PHP Code:
** This defines the modes **
#define MODES 3 
PHP Code:
** Or you can use **
#define MODES 4
#define MODES 5
#define MODES 6 
pawn Code:
public ModeChange()
{
    new stri[100];
    new modes[MODES][0] = {
    {"lvdm"},
    {"bare"},
    {"barron"}
    {"rivershell"}
    };
PHP Code:
#define MINUTES 10
#define MINUTES 60
This defines the time between each change of gamemodes
LINKS:

http://pastebin.com/AAWSZte8

http://jump.fm/BMGLV

Sorry no screens because my SA is messed up, But i promise its 100% safe


Re: Mode Changer - Kidemo - 07.12.2010

The next version will come at the end of december and january.

Cuz i have exams


Re: Mode Changer - Kidemo - 08.12.2010

No comments


Re: Mode Changer - wups - 08.12.2010

OH so bad intendation! Terrible cell sizes!
Since when do minutes have 40 seconds?
pawn Code:
SetTimer("ModeChange", MINUTES*40*1000, 1);
I made this code in 3 mins and it's much better.
pawn Code:
#include <a_samp>
#define TIME 30 // in minutes
#define MAX_MODES 3

new currentmode=0;
public OnFilterScriptInit() SetTimer("Gchange",TIME*1000*60,true);
new modes[MAX_MODES][] =
{
{"bare"},
{"barron"},
{"rivershell"}
};
forward Gchange();
public Gchange()
{
   currentmode++;
   if(currentmode==MAX_MODES) currentmode=0;
   new string[50];
   format(string,sizeof(string),"changemode %s",modes[currentmode]);
   SendRconCommand(string);
   return 1;
}
And you don't have to post all over the code how your scripting skills suck!

Sorry if this is harsh, but it's better for you to understand your mistakes. Good luck!


Re: Mode Changer - Kidemo - 08.12.2010

The next version will have a fix, thanks for that


Re: Mode Changer - Kidemo - 09.12.2010

I need some negative and postitive feedback so i can take it in for the next version.

Thanks


Re: Mode Changer - Kidemo - 12.12.2010

Anyone?


Re: Mode Changer - Marty_Alex - 17.12.2010

I like it


Re: Mode Changer - Karlip - 17.12.2010

Quote:
Originally Posted by ******
View Post
How is this any different to just using server.cfg with a list of modes?
I don't see the difference either.

You can number your GM's and they'll load in a row after the last one exits.


Re: Mode Changer - [aKa]sEnZaTzIE - 17.12.2010

I will use this.
PS : Stop with this words like : I have maked a fs like this in 1 minute , and is much beter ,bla bla .
Maybe this guy is a beginner scripter and for him is hard , because he is beginer o.O ...
Good fs !