Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×
  • 0

Question

11 answers to this question

Recommended Posts

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

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

  • 0
Posted

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;
}

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

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

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

  • 0
Posted

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

@Mister pai nu e de la integeri pt. ca afiseaza culoarea si numele factiuni insa cele gresite.Asta e problema.

Retras

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.