/gov help
#1

This is my /gov command
Код:
CMD:gov(playerid, params[]) {

	new
		string[128];

	if(isnull(params)) SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/gov [message]");

	else if((groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 1 || groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 2) && playerVariables[playerid][pGroupRank] > 4)
	{
		format(string, sizeof(string), "------ Government Announcement (%s) ------", groupVariables[playerVariables[playerid][pGroup]][gGroupName]);
		SendClientMessageToAll(COLOR_TEAL, string);

		GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);
		switch(playerVariables[playerid][pGroupRank]) {
			case 5: format(string, sizeof(string), "* %s %s: %s", groupVariables[playerVariables[playerid][pGroup]][gGroupRankName5], szPlayerName, params);
			case 6: format(string, sizeof(string), "* %s %s: %s", groupVariables[playerVariables[playerid][pGroup]][gGroupRankName6], szPlayerName, params);
		}
		SendClientMessageToAll(COLOR_WHITE, string);
		format(string, sizeof(string), "------ Government Announcement (%s) ------", groupVariables[playerVariables[playerid][pGroup]][gGroupName]);
		SendClientMessageToAll(COLOR_TEAL, string);
 }
	return 1;
}
When you do /gov [Message] It will come up out like this:
------ Government Announcement (%s) ------
*NAME* *TEXT*
------ Government Announcement (%s) ------

How would I make it where you could do:
/Gov start:
------ Government Announcement (%s) ------
*TEXT*
*TEXT*
*AS MANY TIMES AS YOU WANT* (and it will go thru the whole server)
then when you do /endgov or something like that:
------ Government Announcement (%s) ------ << will show up and you can speak normally again?
Reply
#2

Use /gov to enable WriteGov[playerid] and under OnPlayerText you just check for that variable and if they are WriteGov == 1, you send it as a gov message. Then /endgov and it'll go back to normal and send the end message.

Or did you mean to gather up the lines you wrote, and send them in 1 fat package?
If so, you need to store the text into arrays, and publish them on /endgov
Reply
#3

Basically what I mean is. This is what it is at the moment:
/gov Hello
------ Government Announcement (%s) ------
chief RP NAME: Hello
------ Government Announcement (%s) ------
--------------------------------------------------------
This is what I mean:
/gov start
------ Government Announcement (%s) ------
Chief "NAME" "TEXT"
Chief "NAME" "TEXT"
Chief "NAME" "TEXT"
(basically as much times as you want.
------ Government Announcement (%s) ------ << comes up when you /endgov..
it there anyway to do that?
Reply
#4

You should look at the telephone area of the script as that will be similar
Reply
#5

Not really, as it dosen't show the players call all over the server.
Reply
#6

My question was simple...
Do you want to send
|______ Gov message _______|
* Message
each time you press Enter, or do you want to press /gov, then enter a few messages, and then press /endgov. And when you press /endgov, it will come like;

|________ Gov message _______|
* Message
* Message
* Message

??
In that case, you need to like.. /gov 1 "First message here", *ENTER*, /gov 2 "Second message" and then /endgov. Then you can adjust it to publish all the messages like shown above.
Reply
#7

/gov
TEXt [ENTER]
TEXT [ENTER]
/endgov
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)