30.03.2015, 13:11
Well, I added when you setfamed to someone massage player ''Your Famed Status has been set to ...... by Admin ....'' now I got error ''giveplayerid''
CMD codes:
Код:
error 017: undefined symbol "giveplayerid"
Код:
CMD:setfamed(playerid, params[]) { if(PlayerInfo[playerid][pFamed] >= 6 || PlayerInfo[playerid][pAdmin] >= 1337) { new string[128], targetid, level; if(sscanf(params, "ui", targetid, level)) { SendClientMessageEx(playerid, COLOR_GRAD1, "Usage: /setfamed [player] [level]"); SendClientMessageEx(playerid, COLOR_GRAD2, "(1) Old-School - (2) Chartered Old-School - (3) Famed - (4) Famed Commissioner"); SendClientMessageEx(playerid, COLOR_GRAD2, "(5) Vice-Chairman - (6) Chairman"); return 1; } if(IsPlayerConnected(targetid)) { if(targetid != INVALID_PLAYER_ID) { if(PlayerInfo[targetid][pFamed] > PlayerInfo[playerid][pFamed]) return SendClientMessageEx(playerid, COLOR_GRAD1, "You cannot use this command on this person!"); PlayerInfo[targetid][pFamed] = level; format(string, sizeof(string), "AdmCmd: %s has set %s famed level to %d.", GetPlayerNameEx(playerid), GetPlayerNameEx(targetid), level); ABroadCast(COLOR_LIGHTRED, string, 2); SendClientMessage(giveplayerid,COLOR_WHITE, "Your Famed status has been set to %d by Admin %s", GetPlayerNameEx(targetid), level); SendFamedMessage(COLOR_LIGHTRED, string); Log("logs/setfamed.log", string); } } else return SendClientMessageEx(playerid, COLOR_WHITE, "You're not authorized to use this command!"); } else return SendClientMessageEx(playerid, COLOR_GRAD1, "You're not authorized to use this command!"); return 1; }