Jump to content
  • 0

Problema /members


Kingsley

Question

Bun am facut o comanda /members prin care liderii isi pot administra mai usor membrii.Ok...pana aici bine insa am o problema destul de mare.Eu daca imi dau lider la orice factiune sus la numele factiunii si culoarea ei apare factiunea Civil si culoarea ei.

Imagini:http://imgur.com/fu9RqzW

Script:http://pastebin.com/FNeWbQsb

Retras

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0
22 hours ago, Tud0r. said:

Bun am facut o comanda /members prin care liderii isi pot administra mai usor membrii.Ok...pana aici bine insa am o problema destul de mare.Eu daca imi dau lider la orice factiune sus la numele factiunii si culoarea ei apare factiunea Civil si culoarea ei.

Imagini:http://imgur.com/fu9RqzW

Script:http://pastebin.com/FNeWbQsb

cum ai definit factioncolor ?

 

**********************************

Servicii Scripting de calitate:

*********************************

Future Project: ExpertGame

*********************************

Link to comment
Share on other sites

  • 0

Salut, incearca asa:

CMD:members(playerid, params[])
{
    if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "You are not logged in.");
    if(PlayerInfo[playerid][pMember] + PlayerInfo[playerid][pLeader] == 0) return SendClientMessage(playerid, COLOR_ERROR, "You are not member of a faction.");
    new stringg[256], pName2[MAX_PLAYER_NAME], pRankul, pLastLog[128], fString[64];
    mysql_format(handle, stringg, sizeof(stringg), "SELECT * FROM `players` WHERE `Member` = '%d' ORDER BY `Rank` DESC", PlayerInfo[playerid][pMember]);
    new Cache: result12 = mysql_query(handle, stringg);
    gString[128] = (EOS);

    for(new i, j = cache_get_row_count(); i!=j; ++i)
    {
        cache_get_field_content(i,"AName",pName2);
        format(Selected[Numele],24,pName2);
        pRankul=cache_get_field_content_int(i,"Rank");
        cache_get_field_content(i,"LastLogin",pLastLog);

        format(fString,sizeof(fString),"Members of {%s}%s{FFFFFF}(%d members)",FactionColor2[PlayerInfo[playerid][pMember]],FactionName[PlayerInfo[playerid][pMember]],FactionMembers(i));
        new conected = GetPlayerID(Selected[Numele]);
        if(conected = INVALID_PLAYER_ID)
        {
            format(gString,sizeof(gString),"%s - Rank: %d  - {00BC00}online \n",pName2,pRankul);
        }
        else
        {
            format(gString , sizeof(gString),"%s - Rank: %d  - {FF0000}offline - {FFFFFF}Ultimul Login %s \n",pName2,pRankul,pLastLog);
        }
    }
    cache_delete(result12);
    ShowPlayerDialog(playerid,DIALOG_MEMBERS,DIALOG_STYLE_LIST,fString,gString,"Select","Cancel");
    return 1;
}

Link to comment
Share on other sites

  • 0
5 minutes ago, DaEdRiC-FoX said:

cum ai definit factioncolor ?

 

edit:nu merge ce am crezut.

new FactionColor[11] = {
    0xFFFFFFAA,
    0x2641FEAA,
    0x1E519DAA,
    0xB3F856FF,
    0xC2A2DAAA,
    0xFFFF00FF,
    0xA52A2AFF,
    0x008000FF,
    0x800080FF,
    0xFFA500FF,
    0x4F4F4FFF
};

Retras

Link to comment
Share on other sites

  • 0
Just now, Tud0r. said:

edit:nu merge ce am crezut.

new FactionColor[11] = {
    0xFFFFFFAA,
    0x2641FEAA,
    0x1E519DAA,
    0xB3F856FF,
    0xC2A2DAAA,
    0xFFFF00FF,
    0xA52A2AFF,
    0x008000FF,
    0x800080FF,
    0xFFA500FF,
    0x4F4F4FFF
};

trebuie definete altfel deoarece %s arata un string, si tu acolo ai si cifre deci ar trbui sa folosesti %d care arata un integrer, deci nu poti folosi nici %s nici %d trebuie definite altfel

pui la inceputul gm-ului asa:

#

#define rosu blabla
#define negru blabla
etc
etc
etc

apoi la faction color pui rosu negru etc si abea apoi poti folosi %s

 

**********************************

Servicii Scripting de calitate:

*********************************

Future Project: ExpertGame

*********************************

Link to comment
Share on other sites

  • 0

Wopss a spus despre integer aici in topic

 

Tipuri de formatori:

  • %i - afişază un număr întreg (tot numărul).
  • %d - afişază un număr întreg (tot numărul).
  • %s - afişază un string.
  • %f - afişază un număr real / float. (trebuie să aibă tagul Float:)
  • %c - afişază caracter ASCII.
  • %x - afişază un număr Hexadecima.
  • %b - afişază un număr binar.
  • %% - afişază caracterul "%

 

 

 

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.