[HELP] Repeating Filterscript - 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: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Repeating Filterscript (
/showthread.php?tid=193601)
[HELP] Repeating Filterscript -
Baboon - 26.11.2010
Quote:
#include <a_samp>
#define FILTERSCRIPT
#define SECONDS 360000//how much SECONDS between mode change
#define SECONDS 360000//how much SECONDS between mode change
#define SECONDS 360000//how much SECONDS between mode change
#define MODES 3 //how much modes are there to be changed
new row = 0;
forward ModeChange();
public ModeChange()
{
new stri[100];
new modes[MODES][0] = {
{"waterfun"},
{"navy"},
{"AREA51"}
};
format(stri, 100, "changemode %s", modes[row][0]);
SendRconCommand(stri);
if( row >= MODES )
{
row = 0;
}else
if( row < MODES )
{
row = row+1;
}
return 1;
}
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" ModeChange Fs by darkrider366 ([SP]dryftin_vid)");
print("--------------------------------------\n");
SetTimer("ModeChange", SECONDS, 1);
return 1;
}
/* MASSIVE HELP FROM cmg4life, */
|
Well I've got 3 modes as you see. BUT THE PROBLEM IS:
When it is done, so after AREA 51 it won't go back to Waterfun

. It won't repeat. In the end it won't go back to the standard gamemode aswell and start repeating. Is there a way to repeat this filterscript after "AREA51"? Ive tried it as gamemode with changing OnFilterScriptInit.... But not Result.
I preciate some help.
Thank you!
Re: [HELP] Repeating Filterscript -
WillyP - 26.11.2010
Make it a random change around.
Re: [HELP] Repeating Filterscript -
Baboon - 26.11.2010
hmm, how can I do that, thanks

, please edit the script then.
Re: [HELP] Repeating Filterscript -
Kitten - 26.11.2010
pawn Код:
new RandomMode = random(3);
switch(RandomMode)
{
case 0: SendRconCommand("changemode waterfun");
case 1: SendRconCommand("changemode navy");
case 2: SendRconCommand("changemode AREA51");
}
Re: [HELP] Repeating Filterscript -
Baboon - 26.11.2010
What do I have to do with that

How can I give that a timer?
EDIT: I found itself myself! Thanks mem!