Jump to content
  • 0

Intrebare /FACTIONS


marius11

Question

11 answers to this question

Recommended Posts

  • 0

new string[50];

format(string,sizeof(string),"Police Departament [%d]\n SFPD [%d]",members);

ShowPlayerDialog(playerid, DIALOG_FACTIONS, DIALOG_STYLE_LIST, "Factions",string,"Select","Cancel");

//Trebuie sa definesti members cu variabila ta din gm (Ex: pMembers)

Edited by cOBRa
Link to comment
Share on other sites

  • 0
Acum 1 oră, Ksenon a spus:

https://wiki.sa-mp.com/wiki/Dialog_Styles

 

Folosesti DIALOG_STYLE_TABLIST_HEADERS

Am facut asa nu vrea sa mearga imi da eroare

EROARE: 

E:\Users\ionut\Desktop\gamemodes\gmm.pwn(36311) : error 017: undefined symbol "DIALOG_STYLE_TABLIST_HEADERS"
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
 

CMD:factions(playerid, params[])
{
    new members;
    new stringz2[1024];
    for(new xf = 0; xf < MAX_GROUPS; xf++)
    {
        if(strlen(groupVariables[xf][gGroupName]) >= 1 && strcmp(groupVariables[xf][gGroupName], "None", true))
        {
            new stringy2[256], app;
            mysql_format(handle, stringy2, 256, "SELECT * FROM `playeraccounts` WHERE  `playerGroup` = '%d'", xf);
            new Cache: resultx = mysql_query (handle, stringy2);
            members = cache_get_row_count();
            cache_delete(resultx);

            mysql_format(handle, stringy2, 256, "SELECT * FROM `groups` WHERE `groupID` = '%d'", xf);
            new Cache: resultd = mysql_query(handle, stringy2);
            if(cache_get_row_count() != 0)
            {
                cache_get_field_content(0, "groupApplication", result); app = strval(result);
            }
            cache_delete(resultd);

            if(app == 1)
            {
                format(stringz2, sizeof(stringz2),"%s\t [%d/%d]\t%s \t[Status Aplicatie {00FF00}\tON{FFFFFF}]\n", stringz2, members, groupVariables[xf][gMaxMembers], groupVariables[xf][gGroupName]);
            }
            else if(app == 0)
            {
                format(stringz2, sizeof(stringz2),"%s\t [%d/%d]\t%s \t[Status Aplicatie {FF0000\t}OFF{FFFFFF}]\n", stringz2, members, groupVariables[xf][gMaxMembers], groupVariables[xf][gGroupName]);
            }
        }
        ShowPlayerDialog(playerid, DIALOG_FACTIONS, DIALOG_STYLE_TABLIST_HEADERS,"Server: Factions", stringz2, "Select", "Cancel");
    }
    return 1;
}

Link to comment
Share on other sites

  • 0
Acum 7 minute, Ksenon a spus:

Te folosesti de strcat

strcat( stringz2, "Membrii\t\Factiune\tStatus Aplicatii\n" );

Asa trebuie sa pun, nu imi dau seama

 if(app == 1)
            {
                strcat( stringz2, "Membrii\t\Factiune\tStatus Aplicatii\n" );
                format(stringz2, sizeof(stringz2),"%s [%d/%d]\t%s\t[Status Aplicatie]\t {00FF00}ON{FFFFFF} \n", stringz2, members, groupVariables[xf][gMaxMembers], groupVariables[xf][gGroupName]);
            }
            else if(app == 0)
            {
                format(stringz2, sizeof(stringz2),"%s  [%d/%d]\t%s \t[Status Aplicatie]\t {FF0000}OFF{FFFFFF} \n", stringz2, members, groupVariables[xf][gMaxMembers], groupVariables[xf][gGroupName]);
            }

Link to comment
Share on other sites

  • 0
1 minute ago, marius11 said:

Asa trebuie sa pun, nu imi dau seama

 if(app == 1)
            {
                strcat( stringz2, "Membrii\t\Factiune\tStatus Aplicatii\n" );
                format(stringz2, sizeof(stringz2),"%s [%d/%d]\t%s\t[Status Aplicatie]\t {00FF00}ON{FFFFFF} \n", stringz2, members, groupVariables[xf][gMaxMembers], groupVariables[xf][gGroupName]);
            }
            else if(app == 0)
            {
                format(stringz2, sizeof(stringz2),"%s  [%d/%d]\t%s \t[Status Aplicatie]\t {FF0000}OFF{FFFFFF} \n", stringz2, members, groupVariables[xf][gMaxMembers], groupVariables[xf][gGroupName]);
            }

Nu, la inceputul comenzii, dupa new stringz2;

  • Upvote 1
Link to comment
Share on other sites

  • 0
Acum 3 minute, Ksenon a spus:

Nu, la inceputul comenzii, dupa new stringz2;

Am adaugat asa si nu merge :(

CMD:factions(playerid, params[])
{
    new members;
    new stringz2[1024];
     strcat( stringz2, "Membrii\t\Factiune\tStatus Aplicatii\n" );
    for(new xf = 0; xf < MAX_GROUPS; xf++)
    {
        if(strlen(groupVariables[xf][gGroupName]) >= 1 && strcmp(groupVariables[xf][gGroupName], "None", true))
        {
            new stringy2[256], app;
            mysql_format(handle, stringy2, 256, "SELECT * FROM `playeraccounts` WHERE  `playerGroup` = '%d'", xf);
            new Cache: resultx = mysql_query (handle, stringy2);
            members = cache_get_row_count();
            cache_delete(resultx);

Acum 15 minute, Ksenon a spus:

Nu, la inceputul comenzii, dupa new stringz2;

ma ajuti sa pun,ca nu merge

Link to comment
Share on other sites

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.