Jump to content

Problema Factiune.


..IoN..

Recommended Posts

Deci am si eu o problema de 1 ora incerc sa o rezolv dar nu prea imi iese, asa dar cer ajutor-ul vostru.

Cum pot mari sloturile factiuni, am mai umblat eu pe pawno si am gasit urmatoarele date dar nu vad de unde pot selecta alte sloturi la factiuni.

stock ShowFactions(playerid)
{
    new stringz2[MAX_STRING];
     if(DynamicFactions[1][fApplication] == 1)
      {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s {66FF00}[aplicatii deschise]\n", GetFactionMembers(1), DynamicFactions[1][fMaxMembers], DynamicFactions[1][fName]);
    }
    else
    {
         format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s \n", GetFactionMembers(1), DynamicFactions[1][fMaxMembers], DynamicFactions[1][fName]);
    }
     if(DynamicFactions[2][fApplication] == 1)
      {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s {66FF00}[aplicatii deschise]\n", stringz2, GetFactionMembers(2), DynamicFactions[2][fMaxMembers], DynamicFactions[2][fName]);
    }
    else
    {
         format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s \n", stringz2, GetFactionMembers(2), DynamicFactions[2][fMaxMembers], DynamicFactions[2][fName]);
    }
    if(DynamicFactions[3][fApplication] == 1)
    {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s {66FF00}[aplicatii deschise]\n", stringz2, GetFactionMembers(3), DynamicFactions[3][fMaxMembers], DynamicFactions[3][fName]);
    }
    else
    {
         format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s \n", stringz2, GetFactionMembers(3), DynamicFactions[3][fMaxMembers], DynamicFactions[3][fName]);
    }
     if(DynamicFactions[4][fApplication] == 1)
      {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s {66FF00}[aplicatii deschise]\n", stringz2, GetFactionMembers(4), DynamicFactions[4][fMaxMembers], DynamicFactions[4][fName]);
    }
    else
    {
         format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s \n", stringz2, GetFactionMembers(4), DynamicFactions[4][fMaxMembers], DynamicFactions[4][fName]);
    }
     if(DynamicFactions[5][fApplication] == 1)
      {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s {66FF00}[aplicatii deschise]\n", stringz2, GetFactionMembers(5), DynamicFactions[5][fMaxMembers], DynamicFactions[5][fName]);
    }
    else
    {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s \n", stringz2, GetFactionMembers(5), DynamicFactions[5][fMaxMembers], DynamicFactions[5][fName]);
    }
     if(DynamicFactions[6][fApplication] == 1)
      {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s {66FF00}[aplicatii deschise]\n", stringz2, GetFactionMembers(6), DynamicFactions[6][fMaxMembers], DynamicFactions[6][fName]);
    }
    else
    {
         format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s \n", stringz2, GetFactionMembers(6), DynamicFactions[6][fMaxMembers], DynamicFactions[6][fName]);
    }
     if(DynamicFactions[8][fApplication] == 1)
      {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s {66FF00}[aplicatii deschise]\n", stringz2, GetFactionMembers(8), DynamicFactions[8][fMaxMembers], DynamicFactions[8][fName]);
    }
    else
    {
         format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s \n", stringz2, GetFactionMembers(8), DynamicFactions[8][fMaxMembers], DynamicFactions[8][fName]);
    }
     if(DynamicFactions[9][fApplication] == 1)
      {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s {66FF00}[aplicatii deschise]\n", stringz2, GetFactionMembers(9), DynamicFactions[9][fMaxMembers], DynamicFactions[9][fName]);
    }
    else
    {
         format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s \n", stringz2, GetFactionMembers(9), DynamicFactions[9][fMaxMembers], DynamicFactions[9][fName]);
    }
     if(DynamicFactions[10][fApplication] == 1)
      {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s {66FF00}[aplicatii deschise]\n", stringz2, GetFactionMembers(10), DynamicFactions[10][fMaxMembers], DynamicFactions[10][fName]);
    }
    else
    {
         format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s \n", stringz2, GetFactionMembers(10), DynamicFactions[10][fMaxMembers], DynamicFactions[10][fName]);
    }
     if(DynamicFactions[11][fApplication] == 1)
      {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s {66FF00}[aplicatii deschise]\n", stringz2, GetFactionMembers(11), DynamicFactions[11][fMaxMembers], DynamicFactions[11][fName]);
    }
    else
    {
         format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s \n", stringz2, GetFactionMembers(11), DynamicFactions[11][fMaxMembers], DynamicFactions[11][fName]);
    }
     if(DynamicFactions[12][fApplication] == 1)
      {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s {66FF00}[aplicatii deschise]\n", stringz2, GetFactionMembers(12), DynamicFactions[12][fMaxMembers], DynamicFactions[12][fName]);
    }
    else
    {
         format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s \n", stringz2, GetFactionMembers(12), DynamicFactions[12][fMaxMembers], DynamicFactions[12][fName]);
    }
     if(DynamicFactions[13][fApplication] == 1)
      {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s {66FF00}[aplicatii deschise]\n", stringz2, GetFactionMembers(13), DynamicFactions[13][fMaxMembers], DynamicFactions[13][fName]);
    }
    else
    {
         format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s \n", stringz2, GetFactionMembers(13), DynamicFactions[13][fMaxMembers], DynamicFactions[13][fName]);
    }
     if(DynamicFactions[14][fApplication] == 1)
      {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s {66FF00}[aplicatii deschise]\n", stringz2, GetFactionMembers(14), DynamicFactions[14][fMaxMembers], DynamicFactions[14][fName]);
    }
    else
    {
         format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s \n", stringz2, GetFactionMembers(14), DynamicFactions[14][fMaxMembers], DynamicFactions[14][fName]);
    }
    ShowPlayerDialog(playerid, DIALOG_FACTIONS, DIALOG_STYLE_LIST,"Factions", stringz2, "Select", "Cancel");
    return 1;
}
 

Link to comment
Share on other sites

8 minutes ago, ..IoN.. said:

Deci am si eu o problema de 1 ora incerc sa o rezolv dar nu prea imi iese, asa dar cer ajutor-ul vostru.

Cum pot mari sloturile factiuni, am mai umblat eu pe pawno si am gasit urmatoarele date dar nu vad de unde pot selecta alte sloturi la factiuni.

stock ShowFactions(playerid)
{
    new stringz2[MAX_STRING];
     if(DynamicFactions[1][fApplication] == 1)
      {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s {66FF00}[aplicatii deschise]\n", GetFactionMembers(1), DynamicFactions[1][fMaxMembers], DynamicFactions[1][fName]);
    }
    else
    {
         format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s \n", GetFactionMembers(1), DynamicFactions[1][fMaxMembers], DynamicFactions[1][fName]);
    }
     if(DynamicFactions[2][fApplication] == 1)
      {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s {66FF00}[aplicatii deschise]\n", stringz2, GetFactionMembers(2), DynamicFactions[2][fMaxMembers], DynamicFactions[2][fName]);
    }
    else
    {
         format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s \n", stringz2, GetFactionMembers(2), DynamicFactions[2][fMaxMembers], DynamicFactions[2][fName]);
    }
    if(DynamicFactions[3][fApplication] == 1)
    {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s {66FF00}[aplicatii deschise]\n", stringz2, GetFactionMembers(3), DynamicFactions[3][fMaxMembers], DynamicFactions[3][fName]);
    }
    else
    {
         format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s \n", stringz2, GetFactionMembers(3), DynamicFactions[3][fMaxMembers], DynamicFactions[3][fName]);
    }
     if(DynamicFactions[4][fApplication] == 1)
      {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s {66FF00}[aplicatii deschise]\n", stringz2, GetFactionMembers(4), DynamicFactions[4][fMaxMembers], DynamicFactions[4][fName]);
    }
    else
    {
         format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s \n", stringz2, GetFactionMembers(4), DynamicFactions[4][fMaxMembers], DynamicFactions[4][fName]);
    }
     if(DynamicFactions[5][fApplication] == 1)
      {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s {66FF00}[aplicatii deschise]\n", stringz2, GetFactionMembers(5), DynamicFactions[5][fMaxMembers], DynamicFactions[5][fName]);
    }
    else
    {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s \n", stringz2, GetFactionMembers(5), DynamicFactions[5][fMaxMembers], DynamicFactions[5][fName]);
    }
     if(DynamicFactions[6][fApplication] == 1)
      {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s {66FF00}[aplicatii deschise]\n", stringz2, GetFactionMembers(6), DynamicFactions[6][fMaxMembers], DynamicFactions[6][fName]);
    }
    else
    {
         format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s \n", stringz2, GetFactionMembers(6), DynamicFactions[6][fMaxMembers], DynamicFactions[6][fName]);
    }
     if(DynamicFactions[8][fApplication] == 1)
      {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s {66FF00}[aplicatii deschise]\n", stringz2, GetFactionMembers(8), DynamicFactions[8][fMaxMembers], DynamicFactions[8][fName]);
    }
    else
    {
         format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s \n", stringz2, GetFactionMembers(8), DynamicFactions[8][fMaxMembers], DynamicFactions[8][fName]);
    }
     if(DynamicFactions[9][fApplication] == 1)
      {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s {66FF00}[aplicatii deschise]\n", stringz2, GetFactionMembers(9), DynamicFactions[9][fMaxMembers], DynamicFactions[9][fName]);
    }
    else
    {
         format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s \n", stringz2, GetFactionMembers(9), DynamicFactions[9][fMaxMembers], DynamicFactions[9][fName]);
    }
     if(DynamicFactions[10][fApplication] == 1)
      {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s {66FF00}[aplicatii deschise]\n", stringz2, GetFactionMembers(10), DynamicFactions[10][fMaxMembers], DynamicFactions[10][fName]);
    }
    else
    {
         format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s \n", stringz2, GetFactionMembers(10), DynamicFactions[10][fMaxMembers], DynamicFactions[10][fName]);
    }
     if(DynamicFactions[11][fApplication] == 1)
      {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s {66FF00}[aplicatii deschise]\n", stringz2, GetFactionMembers(11), DynamicFactions[11][fMaxMembers], DynamicFactions[11][fName]);
    }
    else
    {
         format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s \n", stringz2, GetFactionMembers(11), DynamicFactions[11][fMaxMembers], DynamicFactions[11][fName]);
    }
     if(DynamicFactions[12][fApplication] == 1)
      {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s {66FF00}[aplicatii deschise]\n", stringz2, GetFactionMembers(12), DynamicFactions[12][fMaxMembers], DynamicFactions[12][fName]);
    }
    else
    {
         format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s \n", stringz2, GetFactionMembers(12), DynamicFactions[12][fMaxMembers], DynamicFactions[12][fName]);
    }
     if(DynamicFactions[13][fApplication] == 1)
      {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s {66FF00}[aplicatii deschise]\n", stringz2, GetFactionMembers(13), DynamicFactions[13][fMaxMembers], DynamicFactions[13][fName]);
    }
    else
    {
         format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s \n", stringz2, GetFactionMembers(13), DynamicFactions[13][fMaxMembers], DynamicFactions[13][fName]);
    }
     if(DynamicFactions[14][fApplication] == 1)
      {
        format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s {66FF00}[aplicatii deschise]\n", stringz2, GetFactionMembers(14), DynamicFactions[14][fMaxMembers], DynamicFactions[14][fName]);
    }
    else
    {
         format(stringz2, sizeof(stringz2),"%s{FFFFFF}[%d/%d] %s \n", stringz2, GetFactionMembers(14), DynamicFactions[14][fMaxMembers], DynamicFactions[14][fName]);
    }
    ShowPlayerDialog(playerid, DIALOG_FACTIONS, DIALOG_STYLE_LIST,"Factions", stringz2, "Select", "Cancel");
    return 1;
}
 

In baza de date, sau scri comanda in game /maxmembers id factiune si numar sloturi.

Cunosc sistemul!

Edit: 

CMD:maxmembers(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 6) // adminul care poate seta /maxmembers
 	{
 	    new fid,maxmembers,string[MAX_STRING];
 	    if(sscanf(params, "dd",fid,maxmembers)) return SendClientMessage(playerid, 0xFFFFFFFF, "{FF9900}Scrie: {33CCFF}/maxmembers <FactionID> <Members>");
 	    if(maxmembers > 4 && maxmembers <= 50) //aici iti selectezi cati membri pot fi setati minim sau maxim de catre adminul mai mare sau egal cu 6. Minimul de membri este 4 iar maximul este  50.
 	    {
 	        if(fid > 0 && fid <= 25)// iar aici este numarul de factiuni, 0 este civilian, iar aici iti setezi cate factiuni ai tu, eu am avut 25. Poti pune 12, 13, 14 sau cate ai tu. 
 	        {
 	        	DynamicFactions[fid][fMaxMembers] = maxmembers;
 	        	mysql_format(SQL, string, sizeof(string), "UPDATE `factions` SET `MaxMembers`='%d' WHERE `ID`='%d'",DynamicFactions[fid][fMaxMembers], fid);
				mysql_tquery(SQL,string,"","");
				format(string, sizeof(string), "Now faction %s have maximum %d members.",DynamicFactions[fid][fName], DynamicFactions[fid][fMaxMembers]);
				SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
			}
			else return SendClientMessage(playerid, COLOR_WHITE, "FactionID must be between 1 and 14.");
		}
		else return SendClientMessage(playerid, COLOR_WHITE, "Max members must be between 1 and 50.");
	}
	else
	{
 		SendClientMessage(playerid, COLOR_ERROR, AdminOnly);
	}
	return 1;
}

Sper ca te-am ajutat.

Edited by razvanduciuc
  • Like 1

Ai nevoie de ajutor in scripting si nu ai bani? Te pot ajuta cu mare drag. Dar asta nu inseamna sa iti lucrez un Sistem de joc complet, daca ai nevoie de ajutor ma poti contacta pe Discord.ezgif-2-3a38433e2465.gif.9283810e304f5e405309769455e5e14b.gif

Link to comment
Share on other sites

Acum 10 minute, razvanduciuc a spus:

In baza de date, sau scri comanda in game /maxmembers id factiune si numar sloturi.

Cunosc sistemul!

Edit: 

CMD:maxmembers(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 6) // adminul care poate seta /maxmembers
 	{
 	    new fid,maxmembers,string[MAX_STRING];
 	    if(sscanf(params, "dd",fid,maxmembers)) return SendClientMessage(playerid, 0xFFFFFFFF, "{FF9900}Scrie: {33CCFF}/maxmembers <FactionID> <Members>");
 	    if(maxmembers > 4 && maxmembers <= 50) //aici iti selectezi cati membri pot fi setati minim sau maxim de catre adminul mai mare sau egal cu 6. Minimul de membri este 4 iar maximul este  50.
 	    {
 	        if(fid > 0 && fid <= 25)// iar aici este numarul de factiuni, 0 este civilian, iar aici iti setezi cate factiuni ai tu, eu am avut 25. Poti pune 12, 13, 14 sau cate ai tu. 
 	        {
 	        	DynamicFactions[fid][fMaxMembers] = maxmembers;
 	        	mysql_format(SQL, string, sizeof(string), "UPDATE `factions` SET `MaxMembers`='%d' WHERE `ID`='%d'",DynamicFactions[fid][fMaxMembers], fid);
				mysql_tquery(SQL,string,"","");
				format(string, sizeof(string), "Now faction %s have maximum %d members.",DynamicFactions[fid][fName], DynamicFactions[fid][fMaxMembers]);
				SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
			}
			else return SendClientMessage(playerid, COLOR_WHITE, "FactionID must be between 1 and 14.");
		}
		else return SendClientMessage(playerid, COLOR_WHITE, "Max members must be between 1 and 50.");
	}
	else
	{
 		SendClientMessage(playerid, COLOR_ERROR, AdminOnly);
	}
	return 1;
}

Sper ca te-am ajutat.

Mersi mult 

Link to comment
Share on other sites

  • Mister locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.