11.04.2012, 19:56
Quote:
[20:49:59] invalid function or declaration |
Код:
CMD:warn(playerid, params[]) { if(PlayerInfo[playerid][pAdminDuty] == 0) return SendClientMessage(playerid, -1, "You must be on Admin Duty to use this Command!"); if (PlayerInfo[playerid][pAdmin] >= 1) { new string[128], giveplayerid, reason[64]; if(sscanf(params, "us[64]", giveplayerid, reason)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /warn [playerid] [reason]"); if(IsPlayerConnected(giveplayerid)) { if(PlayerInfo[giveplayerid][pAdmin] >= 1) { SendClientMessageEx(playerid, COLOR_GRAD2, "Admins can not be warned !"); return 1; } new year, month, day; getdate(year, month, day); format(string, sizeof(string), "AdmCmd: %s was warned by %s, reason: %s", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid), reason); SendClientMessageToAll(COLOR_RED, string, 2); format(string, sizeof(string), "AdmCmd: %s was warned by %s, reason: %s (%d-%d-%d)", GetPlayerNameEx(giveplayerid), GetPlayerNameEx(playerid), reason,month, day, year); Log("logs/admin.log", string); format(string, sizeof(string), "You were warned by %s, reason: %s", GetPlayerNameEx(playerid), reason); SendClientMessageEx(giveplayerid, COLOR_LIGHTRED, string); return 1; } } else SendClientMessageEx(playerid, COLOR_GRAD1, "Invalid player specified."); return 1; }
I just cant fix it,