11.08.2013, 16:46
It was hard to explain, I got errors from this, I know I have did wrong in the code, but I cannot figure it out..
Код:
CMD:hc(playerid, params[]) { if(isnull(params)) return SendClientMessage(playerid, 0xFFFFFFAA, "/hc [Text]"); new string[128], pName[MAX_PLAYER_NAME] ; GetPlayerName(playerid, pName, sizeof(pName)); format(string, sizeof(string), "[Help Chat] Player %s: %s", pName, params); SendClientMessageToAll(COLOR_NEUTRALBLUE, string); else if(pInfo[playerid][Adminlevel] = 1) { GetPlayerName(playerid, pName, sizeof(pName)); format(string, sizeof(string), "[Help Chat] Mapper %s: %s", pName, params); SendClientMessageToAll(COLOR_NEUTRALBLUE, string); } else if(pInfo[playerid][Adminlevel] = 2) { GetPlayerName(playerid, pName, sizeof(pName)); format(string, sizeof(string), "[Help Chat] Lead Mapper %s: %s", pName, params); SendClientMessageToAll(COLOR_NEUTRALBLUE, string); } else if(pInfo[playerid][Adminlevel] = 3) { GetPlayerName(playerid, pName, sizeof(pName)); format(string, sizeof(string), "[Help Chat] Developer %s: %s", pName, params); SendClientMessageToAll(COLOR_NEUTRALBLUE, string); } else if(pInfo[playerid][Adminlevel] = 4) { GetPlayerName(playerid, pName, sizeof(pName)); format(string, sizeof(string), "[Help Chat] Lead Developer %s: %s", pName, params); SendClientMessageToAll(COLOR_NEUTRALBLUE, string); } return 1; }