hey guys i have this command /factions it works if i use /maxmembers factionid numer but when i want to use /togapps to make aplication On and Off it dosen't change
Код HTML:
CMD:factions(playerid, params[])
{
if(gLogged[playerid] == 0) return SendClientMessage(playerid,COLOR_ERROR, "Tu nu esti logat si nu poti sa folosesti aceasta comanda!");
new var[2000];
new coordsstring[64] = "ID\tNume & Nivel Minim\tMembrii\tRecrutari\n";
if(FactionRecruit[playerid] == 1) format(gString, sizeof(gString), "%s{FFFFFF}\t[%d/%d]\t{00cc00}[aplicati deschise]{FFFFFF}\n", DynamicFactions[1][fName], GetFactionMembers(1), DynamicFactions[1][fMaxMembers]);
else format(gString, sizeof(gString), "%s{FFFFFF}\t[%d/%d]\t{F81414}[aplicati inchise]{FFFFFF}\n", DynamicFactions[1][fName], GetFactionMembers(1), DynamicFactions[1][fMaxMembers]);
strcat(var, gString);
if(FactionRecruit[playerid] == 1) format(gString, sizeof(gString), "%s{FFFFFF}\t[%d/%d]\t{00cc00}[aplicati deschise]{FFFFFF}\n", DynamicFactions[2][fName], GetFactionMembers(2), DynamicFactions[2][fMaxMembers]);
else format(gString, sizeof(gString), "%s{FFFFFF}\t[%d/%d]\t{F81414}[aplicati inchise]{FFFFFF}\n", DynamicFactions[2][fName], GetFactionMembers(2), DynamicFactions[2][fMaxMembers]);
strcat(var, gString);
if(FactionRecruit[playerid] == 1) format(gString, sizeof(gString), "%s{FFFFFF}\t[%d/%d]\t{00cc00}[aplicati deschise]{FFFFFF}\n", DynamicFactions[3][fName], GetFactionMembers(3), DynamicFactions[3][fMaxMembers]);
else format(gString, sizeof(gString), "%s{FFFFFF}\t[%d/%d]\t{F81414}[aplicati inchise]{FFFFFF}\n", DynamicFactions[3][fName], GetFactionMembers(3), DynamicFactions[3][fMaxMembers]);
strcat(var, gString);
strins(var, coordsstring, 0);
ShowPlayerDialog(playerid, DIALOG_FACTIONS, DIALOG_STYLE_TABLIST_HEADERS, "Factiuni disponibile", var, "Inchide", "");
return 1;
}
Код HTML:
CMD:togapps(playerid, params[])
{
if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "Tu nu esti logat si nu poti sa folosesti aceasta comanda!");
if(PlayerInfo[playerid][pLeader] == 0) return SendClientMessage(playerid, COLOR_ERROR, "You are not leader.");
new faction = PlayerInfo[playerid][pLeader];
if(FactionRecruit[faction] == 0)
{
FactionRecruit[faction] = 1;
SendClientMessage(playerid, COLOR_WHITE, "* Ai pornit recrutarile pentru factiunea ta!");
mysql_format(handle, gQuery, sizeof(gQuery), "UPDATE `factions` SET `Application` = '1' WHERE `ID` = '%d'", PlayerInfo[playerid][pMember]);
mysql_tquery(handle, gQuery,"","");
return 1;
}
if(FactionRecruit[faction] == 1)
{
FactionRecruit[faction] = 0;
SendClientMessage(playerid, COLOR_WHITE, "* Ai oprit recrutarile pentru factiunea ta!");
mysql_format(handle, gQuery, sizeof(gQuery), "UPDATE `factions` SET `Application` = '0' WHERE `ID` = '%d'", PlayerInfo[playerid][pMember]);
mysql_tquery(handle, gQuery,"","");
return 1;
}
return 1;
}