Jump to content
  • 0

Question

Posted (edited)

Cum fac la comanda /factions sa apara pe coloane adica Los santos police departament apoi pe alta coloana sa apara cati playeri sunt si tot asa

Edited by marius11

11 answers to this question

Recommended Posts

  • 0
Posted (edited)

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
  • 0
Posted
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;
}

  • 0
Posted
1 oră în urmă, Ksenon a spus:

Fa update la includeuri cu cele din packetul sa-mp 0.3.7

Am facut si a mers ms mult dar nu stiu ce trebuie sa mai adaug ca deasupra sa apara Factiuni membri status si nu stiu ce trebuie sa adaug , daca imi mai poti spune asta cum sa fac

AAA.png

  • 0
Posted

Te folosesti de strcat

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

  • 0
Posted
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]);
            }

  • 0
Posted
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
  • 0
Posted
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

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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.