[HELP] Repeating Filterscript
#1

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!
Reply
#2

Make it a random change around.
Reply
#3

hmm, how can I do that, thanks , please edit the script then.
Reply
#4

pawn Код:
new RandomMode = random(3);
switch(RandomMode)
{
    case 0: SendRconCommand("changemode waterfun");
    case 1: SendRconCommand("changemode navy");
    case 2: SendRconCommand("changemode AREA51");
}
Reply
#5

What do I have to do with that How can I give that a timer?

EDIT: I found itself myself! Thanks mem!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)