[FilterScript] Easy to use random server message system - other then others.
#1

Introduction
Yarp, you read it correctly: It's a system that allows you to send a random message to the server. Before you all go like "You freaking tard come up with something special", I'd like to tell you that I'm not proud of this release, I'm just thinking that all those 'nab-scripts' as you call them, have got almost nothing special in it, and that most of the time the user needs to change text in the arrays themselves. This is basically that same system, but it uses a more 'user-friendly' way of doing it. If you're not going to use it, fine, I won't neither. I'm just wanting to show that there are more methods to do something, and that some effort should be put in work.

What's different in this script then in others?
Well, like I said, most of these and related scripts are poorly scripted, and 'advanced' scripters release more scripts 'worth scripting'. This script features three things I don't usually see in 'nab scripts':
  • Using a function to add random messages instead of needing to change it in the array.
  • Not showing a message twice in a row - prevention of a random message being the same as the one before.
  • Using 'smarter controls' as I call them, the "#define synonym word" strategy. Makes it easier to edit the script IMO.
Picture
Using 4 different messages


Adding new messages in the script
To add new messages in the script itself, you simply need to add one line under OnFilterScriptInit:
pawn Код:
AddRandomMessage( text[] );
Most of it is explained in the readme itself, and in the .pwn file. I can't say it enough times though, keep "CURRENT_MESSAGES" updated! This is a 'definition' of the amount of messages you have in your script, set it too low and some messages aren't sent, set it too high and it's most likely you'll get blank messages, I did not test this!

Downloads
SolidFiles - .pwn and readme file
Pastebin.com - .pwn only

Critics are welcome, remember that I only made this script to show that some effort should be put in work, even if you're a new scripter.
Reply
#2

Ahahaha, another nice release from you, lol.

I'll use this and trick people with it, nice release .
Reply
#3

really nice script useful
Reply
#4

Nice release, very usful.
Reply
#5

Pretty cool FS bro. Nice1
Reply
#6

This will help out a lot. Good work!
Reply
#7

thnx i was searching for this
Reply
#8

How do you have time showing next to your text?
Reply
#9

Good...Simple And Good..
Reply
#10

Nice script
Reply
#11

this script is nice but Penguins are forbidden what kinda rule is that. cows should be forbidden!
Reply
#12

i lol'd at the pinguin partXD
Reply
#13

Nice but ehm, one question:
Why do you use the define 'CURRENT_MESSAGES'. Why don't you make a variable or something that'll be counted +1 when you use an "AddRandomMessage". eg.
pawn Код:
new something;

stock AddRandomMessage(text[])
{
    something++;
    for(new m; m < something; m++)
    //BLABLABLA
    return 0;
}

public SendRandomMessage()
{
    new rand = random(something);
    SendClientMessageToAll(MESSAGE_COLOR, RM[rand]);
}
Reply
#14

Quote:
Originally Posted by Kwarde
Посмотреть сообщение
Nice but ehm, one question:
Why do you use the define 'CURRENT_MESSAGES'. Why don't you make a variable or something that'll be counted +1 when you use an "AddRandomMessage". eg.
pawn Код:
new something;

stock AddRandomMessage(text[])
{
    something++;
    for(new m; m < something; m++)
    //BLABLABLA
    return 0;
}

public SendRandomMessage()
{
    new rand = random(something);
    SendClientMessageToAll(MESSAGE_COLOR, RM[rand]);
}
Good point, but you can't update the amount of strings:
pawn Код:
new bla = 2;
new var[bla];
bla = 3;
'var' stretches from 0 to 1.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)