Jump to content

/factions


Pitbul97

Recommended Posts

  • Intrebarea / Cererea mea este: Salut tuturor am marea rugaminte daca cineva mar putea ajuta cu acest mare mister cum pot face la comanda /factions sa apara asa cum apare in aceasta imagine  http://imgur.com/a/TS1wW  stiu ca este destul de complicat avand in vedere ca trebuia acea legatura cu mysql  serverul meu ruleaza deja pe mysql.
  • Alte detalii: Folosesc zcmd si actuala mea comanda /factions arata in felul urmator  http://pastebin.com/B0FYee0N
Link to comment
Share on other sites

Nu putem sa te ajutam daca nu ne dai si variabilele tale ca sa stim cum se stocheaza liderii, membrii sau alte minunatii. Iti las mai jos un exemplu de /factions asa cum am eu.

SQL_Function ShowFactionsDialog( playerid )
{
    new X, Rows, Fields;
    cache_get_data( Rows, Fields, g_Handle );

    gsBigString[ 0 ] = EOS;
	for( new i = 0; i < Rows; i++ )
	{
	    X = cache_get_field_content_int( i, "factionKey", g_Handle );
	    SetGVarInt( "faction_Applications", 		cache_get_field_content_int( i, "factionApplications", g_Handle ), X );
		SetGVarInt( "faction_Members", 				cache_get_field_content_int( i, "factionMembers", g_Handle ), X );
		SetGVarInt( "faction_Slots", 				cache_get_field_content_int( i, "factionSlots", g_Handle ), X );
	}
	gsString[ 0 ] = EOS;
	format( gsString, sizeof gsString, "Nume Factiune\tMembri\tSloturi\tAplicatii\n" );
	foreach( ServerFactions, f )
	{
	    new fStatus[ 32 ];
     	fStatus = ( GetGVarInt( "faction_Applications", f ) ) ? ("{7CFC00}Deschise") : ("{ec2913}Inchise" );
		format( gsString, sizeof(gsString),"%s%s\t%d\t%d\t%s"COL_W"\n", gsString, GetGVarStringEx( "faction_Name", f ), GetGVarInt( "faction_Members", f ), GetGVarInt( "faction_Slots", f ), fStatus );
	}
	ShowPlayerDialog( playerid, DIALOG_FACTIONS, DIALOG_STYLE_TABLIST_HEADERS, "Server: Factions", gsString, "FindHQ", "Cancel" );
	return true;
}

 

Sinner.png

Link to comment
Share on other sites

  • 2 weeks later...
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.