26.08.2012, 08:36
Ok so i made a simple admin chat and it works but if a player types with spaces it dosn't show the words after the spaces here is my code.
pawn Код:
COMMAND:ac(playerid, params[])
{
if(PlayerInfo[playerid][AdminLevel] > 1)
{
new message[200];
if(sscanf(params, "s[32]", message))
{
new string1[252];
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
format(string1,sizeof(string1),"Server Admin %s: %s", pname, message);
SendMessageToAdmins(COLOR_GREEN,string1);
}
else return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /ac [message]");
}
else return SendClientMessage(playerid, COLOR_YELLOW, "You are not an admin");
return 1;
}