[FilterScript] Sistema de Mudanзa de Nick (For Admin's RCON) '-'
#1

Print:


*/ O Player Nгo Precisarб relogar e mudar o nick no sa-mp na hora que mudou o nick so na hora de relogar
/*
PHP код:
#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(playeridparams[])
{
    new 
idNovoNick[MAX_PLAYER_NAME], pName[MAX_PLAYER_NAME], String[25], StrMDN[125], pNameA[MAX_PLAYER_NAME];
    if(
sscanf(params"us"idNovoNick)) return SendClientMessage(playerid, -1"Uso Correto: /mudarnick [id do player] [novo nick]");
    if(
IsPlayerAdmin(playerid))
    {
        
GetPlayerName(idpNamesizeof(pName));
        
GetPlayerName(playeridpNameAsizeof(pNameA));
        
format(Stringsizeof(String), CONTASpName);
        
DOF2_RenameFile(StringNovoNick);
        
DOF2::SaveFile();
        
SetPlayerName(idNovoNick);
        
format(StrMDNsizeof(StrMDN), "*~~D_Info~~* O Administrador %s mudou o nick do player %s para %s."pNameApNameNovoNick);
        
SendClientMessageToAll(-1StrMDN);
    }
    else
    {
        
SendClientMessage(playerid, -1"ERRO: Vocк nгo й um Administrador Logado na RCON!");
        return 
1;
    }
    return 
true;

Feito Por: Dan
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)