03.10.2011, 23:01
If you're using dini, try this:
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",rank);
}
}
return 1;
}
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;
}