13.08.2012, 09:48
Thank you
CMD:setlevel(playerid, params[])
{
new level, id, string[128];
if(pInfo[playerid][pLogin] == 0) return SendClientMessage(playerid, RED, "Register or Login first before using this command!");
if(pInfo[playerid][pAdmin] >= 3 || IsPlayerAdmin(playerid))
{
if(sscanf(params, "ui", id, level)) return SendClientMessage(playerid, RED, "Syntax: /setlevel (id) (1 - 3)");
if(level > 3 || level < 0) return SendClientMessage(playerid, RED, "Invalid Admin Level!, Valid Admin Level - 1 to 3");
if(level == pInfo[id][pAdmin]) return SendClientMessage(playerid, RED, "That player is already in that adminlevel!");
if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, RED, "Player not connected!");
if(pInfo[id][pAdmin] > level) GameTextForPlayer(id, "~r~Demoted", 4000, 3);
if(pInfo[id][pAdmin] < level) GameTextForPlayer(id, "~g~Promoted", 4000, 3);
switch(level)
{
case 0: Admin = "Player";
case 1: Admin = "Moderator";
case 2: Admin = "Administrator";
case 3: Admin = "Server Owner/Co-Owner";
}
pInfo[id][pAdmin] = level;
format(string, sizeof(string), "Administrator %s(%d) has make %s(%d) as Admin Level %d | - %s", GetName(playerid), playerid, GetName(id), id, pInfo[id][pAdmin], Admin);
SendClientMessageToAll(YELLOW, string);
format(string, sizeof(string), "You make %s(%d) as admin %d | - %s", GetName(id), id, pInfo[id][pAdmin], Admin);
SendClientMessage(playerid, LIME, string);
format(string, sizeof(string), "Administrator %s(%d) has make you as Admin Level %d | - %s", GetName(playerid), playerid, pInfo[id][pAdmin], Admin);
SendClientMessage(id, YELLOW, string);
}
else return SendClientMessage(playerid, RED, "You must be Admin Lvl 3 - Server Owner/Co-Owner to use this command!");
return 1;
}
You have to stop triple posting.
Appearantly according to SA-MP rules from what I've heard.... You may only BUMP your topic every 48 hours, there is a modify option please use it. On a Topic related note, I tested out the Gamemode was pretty interesting and unique because I've never heard of Capture the Vehicle.... Nice job 6/10 |