i have only this things with `CRank`
Код HTML:
if(dialogid == DIALOG_CMEMBERS)
{
if(!response) return 1;
if(PlayerInfo[playerid][pCLeader] == 0) return SendClientMessage(playerid, COLOR_ERROR, "Trebuie sa fii lider ca sa accesezi panoul de control!");
if(response)
{
format(PlayerInfo[playerid][pSelected], MAX_PLAYER_NAME, "%s",Selected[listitem][snume]);
new giveplayerid = GetPlayerID( PlayerInfo[playerid][pSelected] );
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PlayerInfo[giveplayerid][pCRank] == 7)
{
SendClientMessage(playerid, COLOR_ERROR, "Membrul selectat este liderul acestui clan, nu poti efectua modificari asupra lui!");
return 1;
}
}
else
{
gQuery[0] = (EOS);
mysql_format(handle, gQuery, sizeof(gQuery), "SELECT `CRank` FROM `players` WHERE `Name` = '%e'", PlayerInfo[playerid][pSelected]);
new Cache:result = mysql_query(handle, gQuery);
new tmp[25], test;
cache_get_field_content(0, "CRank", tmp), test = strval(tmp);
cache_delete(result);
if(test == 7)
{
SendClientMessage(playerid, COLOR_ERROR, "Membrul selectat este liderul acestui clan, nu poti efectua modificari asupra lui!");
return 1;
}
}
new strings[128];
format(strings, sizeof(strings), "{FFFFFF}Administrare membru de clan - %s", PlayerInfo[playerid][pSelected]);
ShowPlayerDialog(playerid, DIALOG_CMEMBERS1, DIALOG_STYLE_LIST, strings, "Schimba rank-ul\nUninvite", "Alege", "Iesi");
}
}
and this
Код HTML:
gQuery[0] = (EOS);
mysql_format(handle, gQuery, sizeof(gQuery), "SELECT `ID`, `CRank` FROM `players` WHERE `Name` = '%e'", PlayerInfo[playerid][pSelected]);
new Cache:result = mysql_query(handle, gQuery);
new tmp[25], test, test2;
cache_get_field_content(0, "ID", tmp), test = strval(tmp);
cache_get_field_content(0, "CRank", tmp), test2 = strval(tmp);
cache_delete(result);
gQuery[0] = (EOS);
mysql_format(handle, gQuery, sizeof(gQuery), "UPDATE `players` SET `CRank` = '%d' WHERE `Name` = '%e' ", rank, PlayerInfo[playerid][pSelected]);
mysql_tquery(handle, gQuery, "", "");
if(rank >= test2)
{
format(gString, sizeof(gString), "You promoted %s to rank %d.",PlayerInfo[playerid][pSelected], rank);
SendClientMessage(playerid, COLOR_SYN2, gString);
format(gString, sizeof(gString), "© {FFFFFF}%s (neconectat) a fost promovat la rank %d de liderul %s.",PlayerInfo[playerid][pSelected], rank, GetName(playerid));
SendClanMessage(PlayerInfo[playerid][pCLeader], COLOR_SYN, gString);
format(gString, sizeof(gString), "Ai fost promovat la rank %d in clan.", rank);
SendPlayerMail(GetSQLID(playerid), test , gString);
}
else
{
format(gString, sizeof(gString), "You demoted %s to rank %d.",PlayerInfo[playerid][pSelected], rank);
SendClientMessage(playerid, COLOR_SYN2, gString);
format(gString, sizeof(gString), "© {FFFFFF}%s (neconectat) a fost retrogradat la rank %d de liderul %s.",PlayerInfo[playerid][pSelected], rank, GetName(playerid));
SendClanMessage(PlayerInfo[playerid][pCLeader], COLOR_SYN, gString);
format(gString, sizeof(gString), "Ai fost retrogradat la rank %d in clan.", rank);
SendPlayerMail(GetSQLID(playerid), test , gString);
}