17.06.2012, 00:54
This is a admin chat command I coded into my script a few hours ago but I've a slight problem with it. My problem is; If I use the command without typing a text and leave it bank, It won't show sendclientmessage. It usual shows up like this, [Owner] [0]Nicholas: *Blank*
How can I fix this?
pawn Код:
CMD:achat(playerid, params[])
{
new PlayerName[128], String[128];
if(PlayerInfo[playerid][Admin] < 1)
if(sscanf (params, "s[128]")) return SendClientMessage(playerid, -1, ""COL_DARKRED"[ADMIN:]"COL_WHITE" Try using"COL_DARKRED" /achat"COL_WHITE" to speak with other admins.");
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(String, sizeof(String),""COL_DARKRED"[%s]"COL_LIGHTBLUE" [%d] %s:"COL_DARKRED" %s", GetAdminLevel(playerid), playerid, PlayerName, params);
SendAdminMessage(-1, String);
Logs(String, 2);
return 1;
}