Jump to content
  • 0

Question

Posted

1. Pt. inceput nu vreau sa aud aici nu se cer FS-uri

2. Eu vreau sa cer un tutorial la cum imi fac stats :D

3. CUM IMI FAC STATS CA MAI JOS?

sa_mp_009.png

9zZndmN.png

5 answers to this question

Recommended Posts

Posted

Daca vrei tutorial , fa o cerere aici : http://www.sa-mp.ro/forum/index.php?topic=13121.0

In legatura cu comanda stats , poftim :

1.Trebuie sa creezi enumerarile :

[pawn]enum pInfo

{

    pCash,

    pKills,

    pDeaths,

    pRank,

    pGameTime,

    pVisits

}

new PlayerInfo[MAX_PLAYERS][pInfo];[/pawn]

2.Creezi comanda :

[pawn]//----------------------------------------------------------------------

#define COLOR_GREEN 0x00FF00FF

//----------------------------------------------------------------------

public OnPlayerCommandText(playerid, cmdtext[])

{

    if (strcmp("/stats", cmdtext, true, 10) == 0)

    {

        if(IsPlayerConnected(playerid))

        {

            new statstring[128];

            SendClientMessage(playerid, COLOR_GREEN, "*** Statistici ***");

            format(statstring, sizeof(statstring), "Ucideri: %d",PlayerInfo[playerid][pKills]);

            SendClientMessage(playerid, COLOR_GREEN, statstring);

            format(statstring, sizeof(statstring), "Decese: %d",PlayerInfo[playerid][pDeaths]);

            SendClientMessage(playerid, COLOR_GREEN, statstring);

            format(statstring, sizeof(statstring), "Bani: $%d",GetPlayerMoney(playerid));

            SendClientMessage(playerid, COLOR_GREEN, statstring);

        }

        return 1;

    }

    return 0;

//----------------------------------------------------------------------

}[/pawn]

O alta metoda pentru comanda /stats mai e si asta :

[pawn]public OnPlayerCommandText(playerid, cmdtext[])

{

    if (strcmp("/stats", cmdtext, true, 10) == 0)

    {

        if(IsPlayerConnected(playerid))

        {

            new statstring[128];

            format(statstring, sizeof(statstring), "| Statistici | Ucideri: %d | Decese: %d | Bani: $%d |",PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths],GetPlayerMoney(playerid));

            SendClientMessage(playerid,-1, statstring);

        }

        return 1;

    }

    return 0;

}[/pawn]

Comanda stats , pe care ti-am puso mai sus , nu foloseste dialog ci SendClientMessage.

Posted

RuNiNg" post="114410" timestamp="1331057769"]

Ai Facut Pentru +1 Nu?

OMFG ... offf..

Altcineva?

Offf Off greu sa faci ceva singur :((((.

Tzaks tea dat metoda prin care se face.

Ai incalcat doua reguli.

1.Titlu.

2.Nu se cer scripuri.

Stiu si eu ... branza e pe bani, dar eu tot ma joc pe gratis!

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.