01.06.2013, 20:22
pawn Код:
CMD:mudarnick(playerid, params[]) {
if (isnull(params))
return SendClientMessage(playerid, -1, "Use: /mudarnick [Novo Nick]");
new cStrNewName[33], Nome[21], cStrOldName[33];
format (cStrNewName, sizeof cStrNewName, "Contas/%s.ini", params);
GetPlayerName(playerid, Nome, 21);
if (fexist(cStrNewName))
return SendClientMessage(playerid, -1, "Nick escolhido jб esta em uso!");
SetPlayerName(playerid, params);
format(cStrOldName, sizeof cStrOldName, "Contas/%s.ini", Nome);
DOF2_RenameFile(cStrOldName,cStrNewName);
return true;
}