Jump to content

TzAkS

Membru
  • Posts

    1,144
  • Joined

  • Last visited

Posts posted by TzAkS

  1. C:\Users\Soap\Desktop\SR The Best\gamemodes\RO.pwn(11369) : error 017: undefined symbol "Cmds2"

    Ti`am zis sa creezi alt string cum e cmds1 sa faci si 2 si pui urmatoarele comenzi acolo.

  2. Pune inafara unu callback asta

    strtok(const string[], &index)
    {
    	new length = strlen(string);
    	while ((index < length) && (string[index] <= ' '))
    	{
    		index++;
    	}
    
    	new offset = index;
    	new result[20];
    	while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    	{
    		result[index - offset] = string[index];
    		index++;
    	}
    	result[index - offset] = EOS;
    	return result;
    }

    LoadFamilies,nu ai niciun public la el,LoadTDHR si f2text nu le-ai creat,daca nu te descurci posteaza liniile.

  3. [pawn]#include <a_samp>

    new Text:scoreandping[MAX_PLAYERS];

    new pDrunkLevelLast[MAX_PLAYERS];

    new pFPS[MAX_PLAYERS];

    new Updater;

    forward ScorenPing(playerid);

    public OnFilterScriptInit()// OnGameModeInIt And/Or OnFilterscriptInIt();

    {

    Updater = SetTimer("ScorenPing", 1000, 1);

    }

    public OnFilterScriptExit()// OnGameModeExit And/Or OnFilterScriptExit();

    {

    KillTimer(Updater);

    }

    // OnPlayerConnect Stuff.

    public OnPlayerConnect(playerid)

    {

        SendClientMessage(playerid,-1," This Server Uses lScore'n'Ping System By Littlehelper AKA iKing");

        scoreandping[playerid] = TextDrawCreate(10.000000,430.000000,"Loading Statistics!");

        TextDrawAlignment(scoreandping[playerid],0);

        TextDrawBackgroundColor(scoreandping[playerid],0x000000ff);

        TextDrawFont(scoreandping[playerid],1);

        TextDrawLetterSize(scoreandping[playerid],0.500000,1.5);

        TextDrawColor(scoreandping[playerid],0xffffffff);

        TextDrawSetOutline(scoreandping[playerid],1);

        TextDrawSetProportional(scoreandping[playerid],1);

        TextDrawSetShadow(scoreandping[playerid],1);

        TextDrawShowForPlayer(playerid, scoreandping[playerid]);

    return 1;

    }

    // OnPlayerDisconnect Stuff.

    public OnPlayerDisconnect(playerid, reason)

    {

        TextDrawDestroy(scoreandping[playerid]);

        return 1;

    }

    // Publics.

    public OnPlayerUpdate(playerid) {

        // handle fps counters.

        new drunknew;

        drunknew = GetPlayerDrunkLevel(playerid);

        if (drunknew < 100) { // go back up, keep cycling.

            SetPlayerDrunkLevel(playerid, 2000);

        } else {

            if (pDrunkLevelLast[playerid] != drunknew) {

                new wfps = pDrunkLevelLast[playerid] - drunknew;

                if ((wfps > 0) && (wfps < 200))

                    pFPS[playerid] = wfps;

                pDrunkLevelLast[playerid] = drunknew;

            }

        }

    }

    public ScorenPing(playerid)

    {

        for(new i = 0; i < MAX_PLAYERS; i++)

        {

            if(IsPlayerConnected(i))

            {

                new string[256];

                format(string,sizeof(string),"Score:~b~%d ~w~Ping:~b~%d ~w~FPS:~b~%d",GetPlayerScore(playerid),GetPlayerPing(playerid),GetPlayerFPS(playerid));

                TextDrawSetString(scoreandping, string);

            }

        }

    }

    // Added FPS On Request.

    stock GetPlayerFPS(playerid)

    {

        SetPVarInt(playerid, "DrunkL", GetPlayerDrunkLevel(playerid));

        if(GetPVarInt(playerid, "DrunkL") < 100)

        {

            SetPlayerDrunkLevel(playerid, 2000);

        }

        else

        {

            if(GetPVarInt(playerid, "LDrunkL") != GetPVarInt(playerid, "DrunkL"))

            {

                SetPVarInt(playerid, "FPS", (GetPVarInt(playerid, "LDrunkL") - GetPVarInt(playerid, "DrunkL")));

                SetPVarInt(playerid, "LDrunkL", GetPVarInt(playerid, "DrunkL"));

                if((GetPVarInt(playerid, "FPS") > 0) && (GetPVarInt(playerid, "FPS") < 256))

                {

                    return GetPVarInt(playerid, "FPS") - 1;

                }

            }

        }

        return 0;

    }[/pawn]

    Titlu!

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