04.04.2017, 01:41
Cara eu passei minutos refazendo e acho que agora vai funcionar, nгo й possivel kkk
PHP код:
CMD:mudarnick(playerid, params[])
{
new nickn[24], data[6];
if(sscanf(params, "s[24]", nickn)) return SendClientMessage(playerid, 0xFF0000FF, "| ERRO | Use: /MudarNick (novo nick).");
getdate(data[0], data[1], data[2]);
gettime(data[3], data[4], data[5]);
if(NickLiberado[playerid] == 0)
{
SendClientMessage(playerid, 0xFF0000FF, "| ERRO | Vocк nгo estб liberado para mudar nick. Peзa pelo /Duvida.");
}
else
{
new nicknovo[70], string[80], nickantigo[70];
format(nickantigo,sizeof(nickantigo), "Contas/%s.ini", PlayerName(playerid));
format(nicknovo,sizeof(nicknovo),"Contas/%s.ini",nickn);
format(string,sizeof(string),"| NICK | O(A) %s %s(%d) trocou de nick. Novo nick: %s (%02d/%02d/%02d %02d:%02d:%02d)", CargoAdm(playerid), PlayerName(playerid), playerid, nickn, data[2], data[1], data[0], data[3], data[4], data[5]);
SendClientMessageToAll(0xF3FF00AA, string);
DOF2_RenameFile(nickantigo, nicknovo);
SetPlayerName(playerid, nickn);
NickLiberado[playerid] = 0;
}
return 1;
}
stock PlayerName(playerid){
new aname[24];
GetPlayerName(playerid, aname, sizeof(aname));
return aname;
}