29.12.2012, 07:34
Hello! I made this command but I cannot make it work properly. It has three variables, but it doesn't support text. If I say something like: /le Hello! it says: SERVER:UNKNOWN COMMAND; but if I type only the command (/le) it says: Grove leader T_Boy: 0
Can you help me?
if (strcmp("/le", cmdtext, true, 10) == 0)
{
new
string[128],
leader[28],
orgname[118],
text[100];
if(sscanf("s[100]",text)) return SendClientMessage(playerid, COLOR_YELLOW, "Usage: /le [text]");
if(!IsLeader(playerid)) return SendClientMessage(playerid, COLOR_YELLOW, "You are not a leader!");
GetPlayerName(playerid, leader, sizeof(leader));
orgname = GetOrgName(PlayerOrg[playerid]);
format(string,sizeof(string), "%s leader %s: %d", orgname, leader, text);
SendClientMessageToLeaders(0xB6BAFFFF,string);
return 1;
}
Can you help me?
if (strcmp("/le", cmdtext, true, 10) == 0)
{
new
string[128],
leader[28],
orgname[118],
text[100];
if(sscanf("s[100]",text)) return SendClientMessage(playerid, COLOR_YELLOW, "Usage: /le [text]");
if(!IsLeader(playerid)) return SendClientMessage(playerid, COLOR_YELLOW, "You are not a leader!");
GetPlayerName(playerid, leader, sizeof(leader));
orgname = GetOrgName(PlayerOrg[playerid]);
format(string,sizeof(string), "%s leader %s: %d", orgname, leader, text);
SendClientMessageToLeaders(0xB6BAFFFF,string);
return 1;
}