[Ajuda] Transferir comandos
#1

Olha Esse CMD TA FUNCIONANDO Certinho
Quote:

CMD:darfuncao(playerid, params[]) {
new admin, funcao[56],string[128],arquivo[128];
new getplayername;
if(PlayerInfo[playerid][pAdmin] < 5000) return SendClientMessage(playerid, COLOR_GRAD2, "Comando restrito apenas pra administradores.");
if(sscanf(params, "us[56]", admin, funcao)) return SendClientMessage(playerid, COLOR_GRAD1, "USE: /darfuncao [ID] [Funcao]");
format(string, sizeof(string), "O Admin Setou Sua Funзao Para [%s]", getplayername, funcao);
SendClientMessage(admin, LIGHTBLUE, string);
format(string, sizeof(string), "Vocк promoveu а funзгo %s de administraзгo.", getplayername, funcao);
SendClientMessage(playerid, LIGHTBLUE, string);
format(arquivo, sizeof(arquivo), "Contas/%s.ini", getplayername);
DOF2_SetString(arquivo, "Funcao", funcao);
DOF2_SaveFile();
format(PlayerInfo[admin][Funcao], 60, "%s", DOF2_GetString(arquivo, "Funcao"));
return 1;

Mais Eu Queria Transferir Ele Para Esse CMD AKI PRA Funcioanr Certinho Tentei mais nao consegui
Quote:

CMD:criaradmin(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 3001)
{
SendClientMessage(playerid, COLOR_GRAD1, "Somente Sub-Donos & Fundadores Tem Esse Comando!");
return 1;
}
new para1;
new level;
if(sscanf(params, "ud", para1, level))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /criaradmin [ID do Player] [Nнvel]");
return 1;
}
if(PlayerInfo[playerid][pAdmin] == 3001 && level > 1336)
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo pode criar admin nнvel acima de 1337!");
return true;
}
if(level > 5000)
{
SendClientMessage(playerid, COLOR_GRAD1, " Nгo se pode criar um admin com Nнvel maior que 5000");
return true;
}

GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsPlayerConnected(para1))
{

if(!TemVagaAdm() && PlayerInfo[para1][pAdmin] < 1)return SendClientMessage(playerid, COLOR_GRAD1, "Sem vagas de admin, use: /limparadmin para limpar uma vaga!");
if(PlayerInfo[para1][pAdminTemp] >= 1)return SendClientMessage(playerid, COLOR_GRAD1, "Voce nгo pode dar Administrador FIXO a um Administrador TEMPORБRIO,Retire Primeiro!");

new string[MAX_STRING];
if(level == 0)
{
format(string, sizeof(string), " Vocк retirou %s de admin.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " Vocк foi retirado de admin, pelo admin %s", sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
PlayerInfo[para1][pAdmin] = 0;
admtrampando[para1] = 0;
admhide[para1] = 0;
Ocupado[para1] = 0;
KillTimer(TempoAdministrador);
SetPlayerToTeamColor(para1);
SetPlayerHealth(para1, 100);
getdate(year, month, day);
gettime(hour,minute,second);
format(string, sizeof(string), "%s retirou o admin de %s", sendername, giveplayer);
BPSLogs("daradmin", string);
RemoverAdmin(NomePlayer(para1));
RemoveVagaAdmin(NomePlayer(para1));
return true;
}
new lolz[40];
if(level == 1)lolz = "Temporario";
else if(level == 2)lolz = "2";
else if(level == 3)lolz = "3";
else if(level == 4)lolz = "4";
else if(level == 5)lolz = "5";
else if(level == 1337)lolz = "MASTER";
else if(level == 3001)lolz = "SUB-DONO";
else if(level == 5000)lolz = "Fundador";
else format(lolz, sizeof lolz, "%s", level);
//if(level >= 1339 && level <= 3000)lolz = "SUB-DONO";
//if(level >= 3001)lolz = "SUB-DONO";
format(string, sizeof(string), " Vocк foi promovido a nнvel %s de admin, pelo admin %s", lolz, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " Vocк promoveu %s para nнvel %s de Admin.", giveplayer,lolz);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
getdate(year, month, day);
admtrampando[para1] = 1;
TempoAdministrador = SetTimerEx("Administrador", 100, true, "i", para1);
admhide[para1] = 0;
SetPlayerToTeamColor(para1);
SetPlayerHealth(para1, 99999);
gettime(hour,minute,second);
format(string, sizeof(string), "%s deu admin Nнvel %s para %s", sendername, lolz, giveplayer);
PlayerInfo[para1][pAdmin] = level;
BPSLogs("daradmin", string);
AddAdmin(NomePlayer(para1), level);
SetVagaAdmin(NomePlayer(para1), level);
}
return 1;
}

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)