#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;
}
NovoNick[MAX_PLAYER_NAME]
// Apenas isto ja esta bom
NovoNick[24]
nгo necessita disto
pawn Код:
#Minha opiniгo : Codigo uteis |
#define MAX_PLAYER_NAME (24)
o mlk ja postou em cуdigo util, e nгo adianta todo mundo vir aquie e ficar postando
"cуdigo util, cуdigo util, cуdigo util, cуdigo util" |