como faz par colocar mais level no sitema de adm do bloody vegas ajuda se, me ajuda vai ganha um bolo sqn nao tenho grana par comprar
pawn Код:
dcmd_setlevel(playerid,params[]) {
if(PlayerInfo[playerid][LoggedIn] == 1) {
if(PlayerInfo[playerid][Level] >= 5 || IsPlayerAdmin(playerid)) {
new tmp[256], tmp2[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
if(!strlen(params)) return SendClientMessage(playerid, red, "USO: /setlevel [playerid] [level]");
new player1, level, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
player1 = strval(tmp);
if(!strlen(tmp2)) return SendClientMessage(playerid, red, "USO: /setlevel [playerid] [level]");
level = strval(tmp2);
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {
if(PlayerInfo[player1][LoggedIn] == 1) {
if(level > ServerInfo[MaxAdminLevel] ) return SendClientMessage(playerid,red,"[ERRO]: Nivel incorreto");
if(level == PlayerInfo[player1][Level]) return SendClientMessage(playerid,red,"[ERRO]: Jogador ja esta neste nivel");
//if(PlayerInfo[player1][Level] >= 5) return SendClientMessage(playerid,red,"Impossivel rebaixar um Admin level 5");
CMDMessageToAdmins(playerid,"SETLEVEL");
GetPlayerName(player1, playername, sizeof(playername)); GetPlayerName(playerid, adminname, sizeof(adminname));
new year,month,day; getdate(year, month, day); new hour,minute,second; gettime(hour,minute,second);
if(level > 0) format(string,sizeof(string),"Administrador (a) %s definiu seu status de administrador (a) [Nivel %d]",adminname, level);
else format(string,sizeof(string),"Administrador (a) %s configurou seu status de ADMIN [nivel %d]",adminname, level);
SendClientMessage(player1,blue,string);
if(level > PlayerInfo[player1][Level]) GameTextForPlayer(player1,"ADMIN PROMOVIDO!", 2000, 3);
else GameTextForPlayer(player1,"ADMIN REBAIXADO!", 2000, 3);
format(string,sizeof(string),"Voce fez a %s o Nivel %d em %d/%d/%d at %d:%d:%d", playername, level, day, month, year, hour, minute, second); SendClientMessage(playerid,blue,string);
format(string,sizeof(string),"Administrador %s fez a %s Nivel %d em %d/%d/%d at %d:%d:%d",adminname, playername, level, day, month, year, hour, minute, second);
SaveToFile("AdminLog",string);
dUserSetINT(PlayerName2(player1)).("level",(level));
PlayerInfo[player1][Level] = level;
return PlayerPlaySound(player1,1057,0.0,0.0,0.0);
} else return SendClientMessage(playerid,red,"[ERRO]: Jogador deve estar registrado e logado como admin");
} else return SendClientMessage(playerid, red, "Jogador nao esta conectado");
} else return SendClientMessage(playerid,red,"[ERRO]: Vocк nгo tem permissгo para isso");
} else return SendClientMessage(playerid,red,"[ERRO]: Voce deve estar logado para usar estes comandos");
}
so vc editar os comandos que vc quer pra admin nivel 7 editar /admins pra nivel 7 tb