24.11.2011, 13:07
This is my /gov command
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?
Код:
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; }
------ 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?