Will this script work?
#1

im new at the pawno stuff
Код:
new RandomMSG[][] =
{
  "Wolf bot: Are you stuck? get help (/help) ^^",
  "Wolf bot: This server is english only",
  "Wolf bot: Visit our website www.wolvez.co.cc",
  "Wolf bot: Wanna know who made what? find out (/credits)",
  "Wolf bot: See a cheater? report them (/report)",
  "Wolf bot: meh"
};
SetTimer("SendMSG", 200000, true);
forward SendMSG();
public SendMSG()
{
  
}
new randMSG = random(sizeof(RandomMSG));
SendClientMessageToAll(red, RandomMSG[randMSG]);
please correct it for me if its wrong
Reply
#2

pawn Код:
new randMSG = random(sizeof(RandomMSG));
SendClientMessageToAll(red, RandomMSG[randMSG]);
will have to be IN the
pawn Код:
public SendMSG()
{
 
}
like this

pawn Код:
public SendMSG()
{
new randMSG = random(sizeof(RandomMSG));
SendClientMessageToAll(red, RandomMSG[randMSG]);
}
edit:

pawn Код:
"Wolf bot: Visit our website http://www.wolvez.co.cc[url=http://]",
will show this URL thingy
Reply
#3

Quote:
Originally Posted by ►☺◄©ookie►☺◄
pawn Код:
new randMSG = random(sizeof(RandomMSG));
SendClientMessageToAll(red, RandomMSG[randMSG]);
will have to be IN the
pawn Код:
public SendMSG()
{
 
}
EDIT: oh reds allready there, will it work now?

like this

pawn Код:
public SendMSG()
{
new randMSG = random(sizeof(RandomMSG));
SendClientMessageToAll(red, RandomMSG[randMSG]);
}
Код:
new RandomMSG[][] =
{
  "Wolf bot: Are you stuck? get help (/help) ^^",
  "Wolf bot: This server is english only",
  "Wolf bot: Visit our website www.wolvez.co.cc",
  "Wolf bot: Wanna know who made what? find out (/credits)",
  "Wolf bot: See a cheater? report them (/report)",
  "Wolf bot: The official braduz motto "Immah teh tech wolf round theese areas"
};
SetTimer("SendMSG", 200000, true);
forward SendMSG();
public SendMSG()
{
  new randMSG = random(sizeof(RandomMSG));
SendClientMessageToAll(red, RandomMSG[randMSG]);
}
tyvm How about an color red for the text?
Reply
#4

2. post edited...

You already send the message in color red or did you not definded the Color?
Reply
#5

Quote:
Originally Posted by ►☺◄©ookie►☺◄
2. post edited...

You already send the message in color red or did you not definded the Color?
...define? all ive done is in the code
Reply
#6

Quote:
Originally Posted by braduz
...define? all ive done is in the code
pawn Код:
#define red 0xAA3333AA
new RandomMSG[][] =
{
  "Wolf bot: Are you stuck? get help (/help) ^^",
  "Wolf bot: This server is english only",
  "Wolf bot: Visit our website http://www.wolvez.co.cc[url=http://][/url]",
  "Wolf bot: Wanna know who made what? find out (/credits)",
  "Wolf bot: See a cheater? report them (/report)",
  "Wolf bot: The official braduz motto "Immah teh tech wolf round theese areas"
};
SetTimer("
SendMSG", 200000, true);
forward SendMSG();
public SendMSG()
{
  new randMSG = random(sizeof(RandomMSG));
SendClientMessageToAll(red, RandomMSG[randMSG]);
}
Reply
#7

Quote:
Originally Posted by ►☺◄©ookie►☺◄
pawn Код:
new randMSG = random(sizeof(RandomMSG));
SendClientMessageToAll(red, RandomMSG[randMSG]);
will have to be IN the
pawn Код:
public SendMSG()
{
 
}
the website url http http http is the forum tryna make it a link LOL nvm about tht

like this

pawn Код:
public SendMSG()
{
new randMSG = random(sizeof(RandomMSG));
SendClientMessageToAll(red, RandomMSG[randMSG]);
}
edit:

pawn Код:
will show this URL thingy
Reply
#8

To make it easyer for you
Load this as an Filterscript (create new .pwn.. complie and add [scriptname] to your filterscripts line)
pawn Код:
#include <a_samp>


new RandomMSG[][] =
{
  "Wolf bot: Are you stuck? get help (/help) ^^",
  "Wolf bot: This server is english only",
  "Wolf bot: Visit our website \"wolvez.co.cc\"",
  "Wolf bot: Wanna know who made what? find out (/credits)",
  "Wolf bot: See a cheater? report them (/report)",
  "Wolf bot: The official braduz motto \"Immah teh tech wolf round theese areas\""
};
#define FILTERSCRIPT
#define red 0xAA3333AA
new timermsg;

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Random Messages Script");
    print("--------------------------------------\n");
    timermsg = SetTimer("SendMSG", 200000, true);
    return 1;
}

public OnFilterScriptExit()
{
    KillTimer(timermsg);
    return 1;
}

#endif
forward SendMSG();
public SendMSG()
{
    new randMSG = random(sizeof(RandomMSG));
    SendClientMessageToAll(red, RandomMSG[randMSG]);
    return 1;
}
(i hate the autofix of the forum ....)
Reply
#9

Quote:
Originally Posted by ►☺◄©ookie►☺◄
To make it easyer for you
Load this as an Filterscript (create new .pwn.. complie and add [scriptname] to your filterscripts line)
pawn Код:
#include <a_samp>


new RandomMSG[][] =
{
  "Wolf bot: Are you stuck? get help (/help) ^^",
  "Wolf bot: This server is english only",
  "Wolf bot: Visit our website \"wolvez.co.cc\"",
  "Wolf bot: Wanna know who made what? find out (/credits)",
  "Wolf bot: See a cheater? report them (/report)",
  "Wolf bot: The official braduz motto \"Immah teh tech wolf round theese areas\""
};
#define FILTERSCRIPT
#define red 0xAA3333AA
new timermsg;

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Random Messages Script");
    print("--------------------------------------\n");
    timermsg = SetTimer("SendMSG", 200000, true);
    return 1;
}

public OnFilterScriptExit()
{
    KillTimer(timermsg);
    return 1;
}

#endif
forward SendMSG();
public SendMSG()
{
    new randMSG = random(sizeof(RandomMSG));
    SendClientMessageToAll(red, RandomMSG[randMSG]);
    return 1;
}
(i hate the autofix of the forum ....)
ok thank you very much you have been of great help, but one last thing..what will the #include <here be called?>
Reply
#10

not, u need to add it in your server cfg file
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)