Can someone convert please? [FAST]
#1

pawn Код:
dcmd_changename(playerid, params[])
{
    new name[MAX_PLAYER_NAME], newname[16];
    GetPlayerName(playerid, name, sizeof(name));
    if(sscanf(params,"s", newname)) return SendClientMessage(playerid, 0xF60000AA, "USAGE: /changename [new name]");
    if(dini_Exists(newname)) return SendClientMessage(playerid, COLOUR_RED, "That name has already been taken!");
    if(strlen(params) >= 3)
    {
        format(file, sizeof(file), "users/%s.txt", name);
        dini_Set(file, "users/%s.txt", newname);
        SendClientMessage(playerid, COLOUR_GREEN, "Your name has been successfully been changed");
        SetPlayerName(playerid, newname);
    }
    else
    {
        SendClientMessage(playerid, COLOUR_YELLOW, "That name is too short, pick something else!");
    }
    return 1;
}

To strcmp?
Reply


Messages In This Thread
Can someone convert please? [FAST] - by VIP475 - 21.01.2013, 13:51
AW: Can someone convert please? - by Blackazur - 21.01.2013, 13:54

Forum Jump:


Users browsing this thread: 1 Guest(s)