[FilterScript] /News Command [Snippet] - 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] /News Command [Snippet] (
/showthread.php?tid=330808)
/News Command [Snippet] -
GtasaPoliceModz - 02.04.2012
What is it ?
Its a news command so players on the server can see news from players.
Why I posted it ?
I posted the snippet to help beginner scripters that are making Roleplay servers. (Got requests on my ******* channel)
How to Install
Just Paste the snippet into your script and your ready.
|| Snippet ||
COLOR DEFINES / NEEDED
Код:
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_SANTORANGE 0xFF6C3BAA
#define COLOR_WHITE 0xFFFFFFAA
CODE IT SELF
Код:
CMD:news(playerid, params[])
{
if(PInfo[playerid][pJob] == 1)
{
new ManName[MAX_PLAYER_NAME];
new string[128];
GetPlayerName(playerid, ManName, sizeof(ManName));
if(isnull(params)) return SendClientMessage(playerid, COLOR_LIGHTBLUE, "(USAGE): /news [message]");
format(string, sizeof(string), "-------------------------------------------------------------------------------------------------------------");
SendClientMessageToAll(COLOR_WHITE,string);
format(string, sizeof(string), "SAN ANDREAS NEWS NETWORK UPDATE");
SendClientMessageToAll(COLOR_SANTORANGE,string);
format(string, sizeof(string), "%s: %s", ManName, params);
SendClientMessageToAll(COLOR_GREY,string);
format(string, sizeof(string), "-------------------------------------------------------------------------------------------------------------");
SendClientMessageToAll(COLOR_WHITE,string);
}
return 1;
}
Re: /News Command [Snippet] -
Marko Koprivanac - 02.04.2012
Good , it will help beginers !!
Re: /News Command [Snippet] -
sjvt - 02.04.2012
wtf is this, and you forgot the COLOR_LIGHTBLUE
Re: /News Command [Snippet] -
Kingunit - 02.04.2012
We don't have your enum, so it's kind of pointless to place it for noobs ..
Re: /News Command [Snippet] -
ReneG - 06.04.2012
This line honestly made me laugh.
pawn Код:
format(string, sizeof(string), "-------------------------------------------------------------------------------------------------------------");
Why format a string with just characters? A little redundant don't you think? Plus SA-MP is only able to print strings less than 128 characters, so one news broadcaster will not be able to fit a whole story in one line, and it'll all just spam the chatbox with hyphens. (i.e Annoying).
Re: /News Command [Snippet] -
Kitten - 06.04.2012
https://sampforum.blast.hk/showthread.php?tid=281
Re: /News Command [Snippet] -
tandytanz - 06.04.2012
Quote:
Originally Posted by Kingunit
We don't have your enum, so it's kind of pointless to place it for noobs ..
|
yeah You Can True because if Noobs don't know to change it and Pointless Noobs can't use this filterscript