Não é necessário o administrador reconectar no servidor.
Imagem:

Download:
PHP Code:
#include <a_samp>
#include <sscanf>
#include <zcmd>
#include <dof2>
// - Defines - //
#define CONTAS "PastaDasContas/%s.ini"
// - Public's - // public OnFilterScriptInit() return 1;
public OnFilterScriptExit() return 1;// - Comandos - // CMD:mudarnick(playerid, params[])
{
new id, NovoNick[MAX_PLAYER_NAME], pName[MAX_PLAYER_NAME], String[25], StrMDN[125], pNameA[MAX_PLAYER_NAME];
if(sscanf(params, "us", id, NovoNick)) return SendClientMessage(playerid, -1, "Uso Correto: /mudarnick [id do player] [novo nick]");
if(IsPlayerAdmin(playerid))
{
GetPlayerName(id, pName, sizeof(pName));
GetPlayerName(playerid, pNameA, sizeof(pNameA));
format(String, sizeof(String), CONTAS, pName);
DOF2_RenameFile(String, NovoNick);
DOF2::SaveFile();
SetPlayerName(id, NovoNick);
format(StrMDN, sizeof(StrMDN), "*~~D_Info~~* O Administrador %s mudou o nick do player %s para %s.", pNameA, pName, NovoNick);
SendClientMessageToAll(-1, StrMDN);
}
else
{
SendClientMessage(playerid, -1, "ERRO: Você não é um Administrador Logado na RCON!");
return 1;
}
return true;
}
Creditos:
Feito por: Dan
0 comentários:
Postar um comentário