Limpar Admin -
LordShadow - 16.06.2013
Eu tenho um comando de limpar o admin, que limpa na pasta do scriptfiles.
Mas tem um problema, ele apenas limpa. Sу com um GMX para poder tirar o admin da pessoa
Eu queria que quando digitasse /limparadmin [nome] , ela perdesse o admin na hora
Comando do limpardmin:
pawn Код:
if (strcmp("/limparadm", cmdtext, true, 10) == 0 || strcmp("/limparadmin", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 1339)
{
MSGPLAYER(playerid, COLOR_GRAD2, "Vocк nгo estб autorizado a usar este comando!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
MSGPLAYER(playerid, COLOR_GRAD2, "USE: /limparadm [ Vaga ]");
return 1;
}
new Vagao = strval(tmp);
if(Vagao < 1 || Vagao > 30) { MSGPLAYER(playerid, COLOR_GREY, "Vaga mнnima 1 mбximo 30!"); return 1; }
getdate(year, month, day);
gettime(hour,minute,second);
format(string, sizeof(string), "%s apagou a vaga %d de %s [%d/%d/%d] бs [%d:%d:%d].", PlayerName(playerid), Vagao, AdmInfo[Vagao][gMembro], day,
month, year, hour, minute, second);
PAdminsLog(string);
strmid(AdmInfo[Vagao][gMembro], "Vazio", 0, strlen("Vazio"), 255);
AdmInfo[Vagao][AdminVaga] = 0;
SaveAdm();
format(string, sizeof(string), "Vocк Limpou A Vaga Nє %d",Vagao);
MSGPLAYER(playerid, COLOR_LIGHTBLUE, string);
return 1;
}
Re: Limpar Admin -
LordShadow - 16.06.2013
Gente nгo precisa ser nesse comando, quero outro comando , sу que de retirar o admin da pessoa
Re: Limpar Admin -
BielCOP - 16.06.2013
pawn Код:
// Topo do GM
stock DemitirAdmin(playerid)
{
new Fala[55];
format(Fala,sizeof(Fala),"O Administrador %s perdeu o seu posto.",PlayerName(playerid));
SendClientMessageToAll(COLOR_LIGHTRED,Fala);
PlayerInfo[playerid][pAdmin] = 0;
admtrampando[playerid] = 0;
SpawnPlayerEx(playerid);
return 1;
}
// Comando
if(strcmp("/limparadm", cmdtext, true, 10) == 0 || strcmp("/limparadmin", cmdtext, true, 10) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 9)
{
SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo estб autorizado a usar este comando!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /limparadmin [ nъmero ]");
return 1;
}
new Vagao = strval(tmp);
if(Vagao < 1 || Vagao > 10) { SendClientMessage(playerid, COLOR_GREY, "Nъmero mнnimo 1 mбximo 10!"); return 1; }
getdate(year, month, day);
gettime(hour,minute,second);
format(string, sizeof(string), "%s limpou a vaga %d de %s [%d/%d/%d] бs [%d:%d:%d].", PlayerName(playerid), Vagao, AdmInfo[Vagao][gMembro], day,
month, year, hour, minute, second);
print(string);
new id = GetPlayerID(AdmInfo[Vagao][gMembro]);
if(IsPlayerOnline(AdmInfo[Vagao][gMembro])) DemitirAdmin(id);
strmid(AdmInfo[Vagao][gMembro], "Vazio", 0, strlen("Vazio"), 999);
AdmInfo[Vagao][AdminVaga] = 0;
format(string, sizeof(string), "Vocк limpou o Admin N° %d",Vagao);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SaveAdm();
return 1;
}
Espero ter ajudado
Re: Limpar Admin -
LordShadow - 17.06.2013
pawn Код:
C:\Users\Tiago\Documents\Tiago\samp03x_svr_R1-2_win32\gamemodes\brs.pwn(17) : warning 201: redefinition of constant/macro (symbol "SPECIAL_ACTION_CUFFED")
C:\Users\Tiago\Documents\Tiago\samp03x_svr_R1-2_win32\gamemodes\brs.pwn(1916) : error 017: undefined symbol "PlayerInfo"
C:\Users\Tiago\Documents\Tiago\samp03x_svr_R1-2_win32\gamemodes\brs.pwn(1917) : error 017: undefined symbol "admtrampando"
C:\Users\Tiago\Documents\Tiago\samp03x_svr_R1-2_win32\gamemodes\brs.pwn(1918) : error 017: undefined symbol "SpawnPlayerEx"
C:\Users\Tiago\Documents\Tiago\samp03x_svr_R1-2_win32\gamemodes\brs.pwn(23895) : warning 219: local variable "Nome" shadows a variable at a preceding level
C:\Users\Tiago\Documents\Tiago\samp03x_svr_R1-2_win32\gamemodes\brs.pwn(25655) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Tiago\Documents\Tiago\samp03x_svr_R1-2_win32\gamemodes\brs.pwn(44923) : warning 219: local variable "Nome" shadows a variable at a preceding level
C:\Users\Tiago\Documents\Tiago\samp03x_svr_R1-2_win32\gamemodes\brs.pwn(49845) : warning 219: local variable "Administrador" shadows a variable at a preceding level
C:\Users\Tiago\Documents\Tiago\samp03x_svr_R1-2_win32\gamemodes\brs.pwn(62743) : warning 219: local variable "xx" shadows a variable at a preceding level
C:\Users\Tiago\Documents\Tiago\samp03x_svr_R1-2_win32\gamemodes\brs.pwn(62743) : warning 219: local variable "yy" shadows a variable at a preceding level
C:\Users\Tiago\Documents\Tiago\samp03x_svr_R1-2_win32\gamemodes\brs.pwn(62743) : warning 219: local variable "zz" shadows a variable at a preceding level
C:\Users\Tiago\Documents\Tiago\samp03x_svr_R1-2_win32\gamemodes\brs.pwn(63876) : warning 209: function "OnPlayerKeyStateChange" should return a value
C:\Users\Tiago\Documents\Tiago\samp03x_svr_R1-2_win32\gamemodes\brs.pwn(41891) : warning 204: symbol is assigned a value that is never used: "PedirAvaliar"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Errors.
Re: Limpar Admin -
LordShadow - 17.06.2013
Eu coloquei o stock + abaixo do GM, mas sу ta dando o erro nesse SpawnPlayerEx
pawn Код:
C:\Users\Tiago\Documents\Tiago\samp03x_svr_R1-2_win32\gamemodes\brs.pwn(17) : warning 201: redefinition of constant/macro (symbol "SPECIAL_ACTION_CUFFED")
C:\Users\Tiago\Documents\Tiago\samp03x_svr_R1-2_win32\gamemodes\brs.pwn(23882) : warning 219: local variable "Nome" shadows a variable at a preceding level
C:\Users\Tiago\Documents\Tiago\samp03x_svr_R1-2_win32\gamemodes\brs.pwn(25642) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Tiago\Documents\Tiago\samp03x_svr_R1-2_win32\gamemodes\brs.pwn(44910) : warning 219: local variable "Nome" shadows a variable at a preceding level
C:\Users\Tiago\Documents\Tiago\samp03x_svr_R1-2_win32\gamemodes\brs.pwn(49832) : warning 219: local variable "Administrador" shadows a variable at a preceding level
C:\Users\Tiago\Documents\Tiago\samp03x_svr_R1-2_win32\gamemodes\brs.pwn(62730) : warning 219: local variable "xx" shadows a variable at a preceding level
C:\Users\Tiago\Documents\Tiago\samp03x_svr_R1-2_win32\gamemodes\brs.pwn(62730) : warning 219: local variable "yy" shadows a variable at a preceding level
C:\Users\Tiago\Documents\Tiago\samp03x_svr_R1-2_win32\gamemodes\brs.pwn(62730) : warning 219: local variable "zz" shadows a variable at a preceding level
C:\Users\Tiago\Documents\Tiago\samp03x_svr_R1-2_win32\gamemodes\brs.pwn(63863) : warning 209: function "OnPlayerKeyStateChange" should return a value
C:\Users\Tiago\Documents\Tiago\samp03x_svr_R1-2_win32\gamemodes\brs.pwn(68642) : error 017: undefined symbol "SpawnPlayerEx"
C:\Users\Tiago\Documents\Tiago\samp03x_svr_R1-2_win32\gamemodes\brs.pwn(41878) : warning 204: symbol is assigned a value that is never used: "PedirAvaliar"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
Re: Limpar Admin -
LordShadow - 17.06.2013
Malz pelo, Triple ! Mas eu consegui ! Era SpawnPlayer ao invйs de SpawnPlayerEx. VALEU + REP PRA TI, O Comando ta funfando normal !