[Ajuda] File Exists
#2

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;
}
Reply


Messages In This Thread
File Exists - by connork - 01.06.2013, 19:46
Re: File Exists - by Gii - 01.06.2013, 20:22
Re: File Exists - by connork - 01.06.2013, 20:40
Re: File Exists - by Gii - 01.06.2013, 20:55
Re: File Exists - by connork - 01.06.2013, 21:43

Forum Jump:


Users browsing this thread: 1 Guest(s)