dcmd_setlevel(playerid,params[]) { if (PlayerInfo[playerid][Level] > 1) { new LevelUpAnnouncement[128], AdministratorName[MAX_PLAYER_NAME], LevelPlayer[MAX_PLAYER_NAME], PlayerFile[128], id; if (sscanf(params, "ud", id, Level)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /setlevel [playerid/partname] [level]"); else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found"); else { if(PlayerInfo[id][LoggedIn] == 1) { GetPlayerName(id, LevelPlayer, sizeof(LevelPlayer)); GetPlayerName(playerid, AdministratorName, sizeof(AdministratorName)); format(LevelUpAnnouncement, sizeof(LevelUpAnnouncement),"Administrator %s made %s a Administrator [Level: %d]",AdministratorName, LevelPlayer, Level); SendClientMessageToAll(AdministrationAnnouncement, LevelUpAnnouncement); PlayerInfo[id][Level] = Level; format(PlayerFile, sizeof(PlayerFile), "Users/%s.max", LevelPlayer); dini_IntSet(PlayerFile, "AdminLevel", Level); PlayerPlaySound(id, 1057, 0.0, 0.0, 0.0); } else { SendClientMessage(playerid, AdministrationError, "Error: The player must be logged in to use this command!"); } } } else { SendClientMessage(playerid, AdministrationError, NotAdminError); } }
C:\Users\Christopher\Desktop\AdminMax.pwn(810) : warning 213: tag mismatch C:\Users\Christopher\Desktop\AdminMax.pwn(821) : warning 213: tag mismatch C:\Users\Christopher\Desktop\AdminMax.pwn(825) : warning 213: tag mismatch C:\Users\Christopher\Desktop\AdminMax.pwn(829) : warning 213: tag mismatch
Line 810: if (sscanf(params, "ud", id, Level)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /setlevel [playerid/partname] [level]") Line 821: format(LevelUpAnnouncement, sizeof(LevelUpAnnouncement),"Administrator %s made %s a Administrator [Level: %d]",AdministratorName, LevelPlayer, Level); Line 825: PlayerInfo[id][Level] = Level; Line 829: dini_IntSet(PlayerFile, "AdminLevel", Level);
if (sscanf(params, "ud", id, Level)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /setlevel [playerid/partname] [level]");
Originally Posted by gotenks918
I know this doesn't really relate to your problem, but you should use ZCMD.
|
Originally Posted by DarK TeaM PT
im not sure but
pawn Код:
|