02.04.2012, 16:46
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; }