por GinooD Miér Ene 29, 2014 12:02 pm
- Código:
zcmd(makeadmin, playerid, params[]){
if(Info[playerid][pAdminZC] < 1338) return SendClientMessageEx(playerid, COLOR_GREY, " No autorizado!");
new giveplayerid, level;
if(!sscanf(params, "di", giveplayerid, level)){
if(IsPlayerConnected(giveplayerid)){
new string[128];
Info[giveplayerid][pAdminZC] = level;
format(string, sizeof(string), "AdmCmdExe: %s lo ha asignado administrador nivel %d", GetPlayerNameEx(playerid), level);
SendClientMessageEx(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "AdmCmdExe: %s ha asignado administrador nivel %d a %s", GetPlayerNameEx(playerid), level, GetPlayerNameEx(giveplayerid));
ABroadCast(COLOR_ORANGE,string,2);
format(string, sizeof(string), "* %s asignó a %s administrador nivel [%d]", GetPlayerNameEx(playerid),GetPlayerNameEx(giveplayerid),level);
Log("logs/admins.log", string);
new log[255];
format(log, 225, "* El usuario %s se le ha modificado su nivel administrativo a %d ", GetPlayerNameEx(giveplayerid), level);
Log("logs/Admins.log", log);
} else SendClientMessageEx(playerid, COLOR_GRAD2, " Esa ID es inválida.");
} else SendClientMessageEx(playerid, COLOR_GRAD2, "* /makeadmin <ID> <Nivel>");
return 1;
}
PAra sacarle el admin Solo pon /makeadmin [ID] 0 y listo , y aqui el de dar lider y quitar
- Código:
zcmd(makeleader, playerid, params[])
{
if(Info[playerid][pAdminZC] > 1337 || Info[playerid][pFactionModerator] == 1)
{
if(!sscanf(params, "di", params[0], params[1]))
{
new ftext[30];
if(params[1] < 0 || params[1] > MAX_FACTION) return SendClientMessageEx(playerid, COLOR_GREY, "ID facción incorrecto.");
if(!IsPlayerConnected(params[0])) return SendClientMessageEx(playerid, COLOR_GREY, "Jugado desconectado.");
switch(params[1])
{
case 0: {Info[params[0]][pRank] = 0; ftext = "Ninguna"; }
case 1: {Info[params[0]][pRank] = 6; ftext = "San Andreas Police Department"; }
case 2: {Info[params[0]][pRank] = 6; ftext = "FBI"; }
case 3: {Info[params[0]][pRank] = 6; ftext = "San Andreas Ejército Militar"; }
case 4: {Info[params[0]][pRank] = 6; ftext = "San Andreas Medical Deparment"; }
case 5: {Info[params[0]][pRank] = 6; ftext = "SA News"; }
case 6: {Info[params[0]][pRank] = 6; ftext = "Mecanicos 24/7"; }
case 7: {Info[params[0]][pRank] = 6; ftext = "Gobierno"; }
case 8: {Info[params[0]][pRank] = 6; ftext = "Hitman"; }
case 9: {Info[params[0]][pRank] = 6; ftext = "Sistema Judicial"; }
}
new string[128];
pTazer[params[0]] = 0;
Info[params[0]][pLeader] = params[1];
Info[params[0]][pMember] = params[1];
format(string, sizeof(string), "Administrador %s te asignó el líder de la facción %s.", GetPlayerNameEx(playerid), ftext);
SendClientMessageEx(params[0], 0x6ADFFFFF, string);
format(string, sizeof(string), "AdmCmdExe: %s asigno lider de la facción %s a %s.", GetPlayerNameEx(playerid), ftext, GetPlayerNameEx(params[0]));
ABroadCast(COLOR_ORANGE, string, 3);
}
else SendClientMessageEx(playerid, COLOR_GRAD2, "USA: /makeleader [jugador] [facción]");
}
else SendClientMessageEx(playerid, COLOR_GRAD2, "No autorizado.");
return 1;
}
Son del GM de ZC , Salu2 Espero haberte ayudado