03.10.2011, 21:00
(
Последний раз редактировалось Kingunit; 04.10.2011 в 15:27.
Причина: <fixed>
)
<fixed>
strcat(PlayerInfo[id][Rank], rank);
"us[24]"
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;
}
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;
}
CMD:setrank(playerid, params[])
{
new
id,
rank[24];
if(sscanf(params, "us[64]", id, rank)) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_DGREY"[CMD] / "#COL_SGREY"[PlayerID/PartOfName] [Rank]");
else if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_ORANGE"[ERROR]"#COL_LRED" Player not connected!");
{
PlayerInfo[id][Rank] = rank;
}
return 1;
}
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]");
else if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_WHITE, ""#COL_ORANGE"[ERROR]"#COL_LRED" Player not connected!");
format(PlayerInfo[id][Rank], 24, "%s", rank);
return 1;
}