Faction rank
#6

If you're using dini, try this:

pawn Код:
CMD:setrank(playerid, params[])
{
    new id, rank[24];
   
    if(sscanf(params, "us[24]", id, rank)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_DGREY"[CMD] / "#COL_SGREY"[PlayerID/PartOfName] [Rank]");
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_ORANGE"[ERROR]"#COL_LRED" Player not connected!");
   
    new name[24];
    GetPlayerName(id,name,24);
   
    if(udb_Exists(name(id)))
    {
        if(PlayerInfo[id][LoggedIn] == 1) // use ur logged in enum or delete this
        {
            dUserSetINT(name(id)).("Rank",rank);
        }
    }
    return 1;
}
If that doesn't work, try this:

pawn Код:
CMD:setrank(playerid, params[])
{
    new id, rank[24];
   
    if(sscanf(params, "us[24]", id, rank)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_DGREY"[CMD] / "#COL_SGREY"[PlayerID/PartOfName] [Rank]");
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_ORANGE"[ERROR]"#COL_LRED" Player not connected!");
   
    new name[24];
    GetPlayerName(id,name,24);
   
    if(udb_Exists(name(id)))
    {
        if(PlayerInfo[id][LoggedIn] == 1) // use ur logged in enum or delete this
        {
            dUserSetINT(name(id)).("Rank",PlayerInfo[id][Rank]);
        }
    }
    return 1;
}
Reply


Messages In This Thread
XX - by Kingunit - 03.10.2011, 21:00
Re: Faction rank - by [L3th4l] - 03.10.2011, 21:16
Re: Faction rank - by TheLazySloth - 03.10.2011, 21:17
Re: Faction rank - by Kingunit - 03.10.2011, 21:18
Re: Faction rank - by Kingunit - 03.10.2011, 21:22
Re: Faction rank - by grand.Theft.Otto - 03.10.2011, 23:01
Re: Faction rank - by Kush - 03.10.2011, 23:20
Re: Faction rank - by DRIFT_HUNTER - 03.10.2011, 23:31

Forum Jump:


Users browsing this thread: 1 Guest(s)