26.05.2012, 09:40
Hello, i've been trying to make a /dc(divisionChat) command and here's my command
and here's my SendDivisionMessage
Now as you can see my
SendDivisionMessage(?WhatDOINeedtoPuthereSoThatITW illSendIttoitsDivision?, RADIO, string);
Well the question is there
What do i need to put in
SendDivisionMessage("HERE", RADIO, string);
So that it will send it to the dudes in his division?
pawn Код:
CMD:dc(playerid, params[])
{
new string[128];
if(isnull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /dc [Division Chat]");
switch(PlayerInfo[playerid][pDivision])
{
case 1: division = " (Army)";
case 2: division = " (Navy)";
case 3: division = " (Air Force)";
case 4: division = " (USMC)";
case 5: division = " (Coast Guard)";
case 6: division = " (MP)";
format(string, sizeof(string), "** %s%s %s: %s **", rank, division, GetPlayerNameEx(playerid), params);
SendDivisionMessage(?WhatDOINeedtoPuthereSoThatITWillSendIttoitsDivision?, RADIO, string);
}
return 1;
}
pawn Код:
forward SendDivisionMessage(division, color, string[]);
public SendDivisionMessage(division, color, string[])
{
foreach(Player, i)
{
if(PlayerInfo[i][pDivision] == division)
{
SendClientMessageEx(i, color, string);
}
}
}
SendDivisionMessage(?WhatDOINeedtoPuthereSoThatITW illSendIttoitsDivision?, RADIO, string);
Well the question is there
What do i need to put in
SendDivisionMessage("HERE", RADIO, string);
So that it will send it to the dudes in his division?