SA-MP Forums Archive
[FilterScript] Easy to use random server message system - other then others. - 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] Easy to use random server message system - other then others. (/showthread.php?tid=186569)



Easy to use random server message system - other then others. - Hiddos - 29.10.2010

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': 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.


Re: Easy to use random server message system - other then others. - TheHoodRat - 29.10.2010

Ahahaha, another nice release from you, lol.

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


Re: Easy to use random server message system - other then others. - Kitten - 31.10.2010

really nice script useful


Re: Easy to use random server message system - other then others. - Lorenc_ - 31.10.2010

Nice release, very usful.


Re: Easy to use random server message system - other then others. - ViruZZzZ_ChiLLL - 31.10.2010

Pretty cool FS bro. Nice1


Re: Easy to use random server message system - other then others. - Scenario - 31.10.2010

This will help out a lot. Good work!


Re: Easy to use random server message system - other then others. - misho1 - 14.03.2011

thnx i was searching for this


Re: Easy to use random server message system - other then others. - Rocketeer - 15.03.2011

How do you have time showing next to your text?


Re: Easy to use random server message system - other then others. - [Ips]Guh - 15.03.2011

Good...Simple And Good..


Re: Easy to use random server message system - other then others. - Ironboy - 15.03.2011

Nice script


Re: Easy to use random server message system - other then others. - Fool - 15.03.2011

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


Re: Easy to use random server message system - other then others. - justsomeguy - 15.03.2011

i lol'd at the pinguin partXD


Re: Easy to use random server message system - other then others. - Kwarde - 15.03.2011

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]);
}



Re: Easy to use random server message system - other then others. - Hiddos - 15.03.2011

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.