Jump to content

FuNNkY123

Membru
  • Posts

    9
  • Joined

  • Last visited

Posts posted by FuNNkY123

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

  2. Chiar acum, VenoWW a spus:

    Salut

     

    Frumos Speedometer ,dar imi pare cunoscut.In fine +1 pentru munca depusa .

    Este facut de mine, iti garantez ;).. Da, intradevar, m-am inspirat din altele, cand o sa-mi vina vre-o idee de unu' unic din toate punctele de vedere o sa-l fac si o sa-l postez :))

  3. Comanda este asa: 

    Pe ZCMD:

     

     CMD:engine(playerid, params[])
    {
    //continut comanda
    }
    Pe ini:
    
    if(strcmp(cmd, "/engine", true) == 0)
    {
    //continut comanda
    }

    Tu iei decat continut-ul la comanda si-l pui. ;)

    +1 daca ti-am fost de ajutor.

  4. Pai, cauti in GM(ctrl+f):

    public OnPlayerKeyStateChange 

    Daca nu ai, adaugi tu asta:

     

    public OnPlayerKeyStateChange
    {
    //aici pui bind-ul
    return 0;
    }
    Dupa, ca sa faci un bind, trebuie sa faci asa:
    Pui asta:
    
    if (newkeys & KEY_LOOK_BEHIND)
    {
    //aici pui tot ce contine comanda /engine inafar de prima si ultima paranteza
    }

    Aici ai o lista cu bind-uri https://wiki.sa-mp.com/wiki/Keys

    Succes!

    Scuze dar nu prea ma pricep la tutoriale. :)

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