Jump to content

TheBrainDit

Membru
  • Posts

    78
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by TheBrainDit

  1. Hello,

    I was bored so i decided to create a selfie filterscript.

    its a really simple filterscript that doesnt require any skills at all but its kinda fun.

    Whats New:
    ~Now you can move in circle with the camera.
    ~Added /td to show/hide the textdraws.
    ~Fixed the clearanimations after you stop taking the selfie.

    ScreenShots:

    V0.1 ScreenShots:

    b8G9wB0.jpg

    24Uh2zX.jpg

    V0.2 ScreenShots

    8XM54VN.png

    319nRK4.png

    Download:

    V0.2

    #define FILTERSCRIPT
    
    #include <a_samp>
    #include <zcmd>
    
    #define PRESSED(%0) 
    	(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
    	
    new takingselfie[MAX_PLAYERS];
    new Float:Degree[MAX_PLAYERS];
    const Float: Radius = 1.4; //do not edit this
    const Float: Speed  = 1.25; //do not edit this
    const Float: Height = 1.0; // do not edit this
    new Text:Textdraw2;
    new Float:lX[MAX_PLAYERS];
    new Float:lY[MAX_PLAYERS];
    new Float:lZ[MAX_PLAYERS];
    new hiden[MAX_PLAYERS];
    
    #define COLOR_WHITE 0xFFFFFFAA
    #define COLOR_RED 0xFF0000AA
    
    #if defined FILTERSCRIPT
    
    public OnFilterScriptInit()
    {
    	print("n--------------------------------------");
    	print(" Selfie FilterScript By: JFF");
    	print("--------------------------------------n");
    	for(new i =0; i<MAX_PLAYERS;i++)
    	    takingselfie = 0;
    	Textdraw2 = TextDrawCreate(227.000000, 10.000000, "~r~Press F8 to take a selfie.~n~~n~~y~Num 6/Num 4 to move the camera.~n~~n~~p~/td to hide/show the textdraws.~n~~n~~g~/selfie to stop taking selfies.~n~~n~~w~/headmove to disable the head movement.");
    	TextDrawBackgroundColor(Textdraw2, 255);
    	TextDrawFont(Textdraw2, 1);
    	TextDrawLetterSize(Textdraw2, 0.500000, 1.300000);
    	TextDrawColor(Textdraw2, -16776961);
    	TextDrawSetOutline(Textdraw2, 0);
    	TextDrawSetProportional(Textdraw2, 1);
    	TextDrawSetShadow(Textdraw2, 1);
    	TextDrawSetSelectable(Textdraw2, 0);
    	return 1;
    }
    
    public OnFilterScriptExit()
    {
        for(new i =0; i<MAX_PLAYERS;i++)
    	    takingselfie = 0;
    	return 1;
    }
    
    #else
    
    main()
    {
    	print("n--------------------------------------");
    	print(" Selfie FilterScript By: JFF");
    	print("--------------------------------------n");
    }
    
    #endif
    
    public OnPlayerConnect(playerid)
    {
    	takingselfie[playerid] = 0;
    	return 1;
    }
    
    public OnPlayerDisconnect(playerid, reason)
    {
    	takingselfie[playerid] = 0;
    	return 1;
    }
    
    public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
    {
    	if(takingselfie[playerid] == 1)
    	{
    		if(PRESSED(KEY_ANALOG_RIGHT))
    		{
    			GetPlayerPos(playerid,lX[playerid],lY[playerid],lZ[playerid]);
    			static Float: n1X, Float: n1Y;
    		    if(Degree[playerid] >= 360) Degree[playerid] = 0;
    		    Degree[playerid] += Speed;
    		    n1X = lX[playerid] + Radius * floatcos(Degree[playerid], degrees);
    		    n1Y = lY[playerid] + Radius * floatsin(Degree[playerid], degrees);
    		    SetPlayerCameraPos(playerid, n1X, n1Y, lZ[playerid] + Height);
    		    SetPlayerCameraLookAt(playerid, lX[playerid], lY[playerid], lZ[playerid]+1);
    		    SetPlayerFacingAngle(playerid, Degree[playerid] - 90.0);
    		}
    		if(PRESSED(KEY_ANALOG_LEFT))
    		{
    		    GetPlayerPos(playerid,lX[playerid],lY[playerid],lZ[playerid]);
    			static Float: n1X, Float: n1Y;
    		    if(Degree[playerid] >= 360) Degree[playerid] = 0;
    		    Degree[playerid] -= Speed;
    		    n1X = lX[playerid] + Radius * floatcos(Degree[playerid], degrees);
    		    n1Y = lY[playerid] + Radius * floatsin(Degree[playerid], degrees);
    		    SetPlayerCameraPos(playerid, n1X, n1Y, lZ[playerid] + Height);
    		    SetPlayerCameraLookAt(playerid, lX[playerid], lY[playerid], lZ[playerid]+1);
    		    SetPlayerFacingAngle(playerid, Degree[playerid] - 90.0);
    		}
    	}
    	return 1;
    }
    
    CMD:selfie(playerid,params[])
    {
    	if(takingselfie[playerid] == 0)
    	{
    	    GetPlayerPos(playerid,lX[playerid],lY[playerid],lZ[playerid]);
    		static Float: n1X, Float: n1Y;
    		if(Degree[playerid] >= 360) Degree[playerid] = 0;
    		Degree[playerid] += Speed;
    		n1X = lX[playerid] + Radius * floatcos(Degree[playerid], degrees);
    		n1Y = lY[playerid] + Radius * floatsin(Degree[playerid], degrees);
    		SetPlayerCameraPos(playerid, n1X, n1Y, lZ[playerid] + Height);
    		SetPlayerCameraLookAt(playerid, lX[playerid], lY[playerid], lZ[playerid]+1);
    		SetPlayerFacingAngle(playerid, Degree[playerid] - 90.0);
    		takingselfie[playerid] = 1;
    		ApplyAnimation(playerid, "PED", "gang_gunstand", 4.1, 1, 1, 1, 1, 1, 1);
    	    TextDrawShowForPlayer(playerid,Textdraw2);
    		return 1;
    	}
        if(takingselfie[playerid] == 1)
    	{
    	    TogglePlayerControllable(playerid,1);
    		SetCameraBehindPlayer(playerid);
    	    TextDrawHideForPlayer(playerid,Textdraw2);
    	    takingselfie[playerid] = 0;
    	    ApplyAnimation(playerid, "PED", "ATM", 4.1, 0, 1, 1, 0, 1, 1);
    	    return 1;
    	}
        return 1;
    }
    
    CMD:td(playerid,params[])
    {
    	if(takingselfie[playerid] == 0) return SendClientMessage(playerid,COLOR_RED,"ERROR: This command works only while taking a selfie");
    	if(hiden[playerid] == 0)
    	{
        	TextDrawHideForPlayer(playerid,Textdraw2);
        	hiden[playerid] = 1;
        	return 1;
        }
        if(hiden[playerid] == 1)
    	{
        	TextDrawShowForPlayer(playerid,Textdraw2);
        	hiden[playerid] = 0;
        	return 1;
        }
        return 1;
    }
    
    • Upvote 1
  2. Well, I was doing nothing, I decided to create my first filterscript of TextDraw! I hope you enjoy.

    ** FIRST FILTERSCRIPT! **

    Sorry, i captured the print with 60% of quality. the textdraws are more beautiful than those in print.
    Print:
    KA6qEkV.jpg

    Code:

    /*
    StarPeens
    Filterscript
    Textdraw Full Player information
    
    *** --- ***
    Contains:
    Name
    Ping
    Fps
    Score
    Kills
    Deaths
    Day
    */
    
    #include <a_samp>
    #include <dini>
    
    
    
    enum pInfo
    {
    kills,
    death,
    }
    new PlayerInfo[MAX_PLAYERS][pInfo];
    // FPS
    new pDrunkLevelLast[MAX_PLAYERS];
    new pFPS[MAX_PLAYERS];
    
    new Text:Textdraw0;
    new Text:Textdraw1;
    new Text:Textdraw3;
    new Text:Textdraw4;
    new Text:Textdraw6;
    
    new Text:Score[MAX_PLAYERS];
    
    new Text:Name[MAX_PLAYERS];
    
    forward Infos(playerid);
    
    public OnFilterScriptInit()
    {
    	SetTimer("pScore", 1000, true);
    	SetTimer("pName", 1000, true);
        SetTimer("Infos",1000,true);
        SetTimer("tt",1000,1);
    	print("    StarPeens Player Information Filterscript Loaded.");
    
    	// Create the textdraws:
    	Textdraw0 = TextDrawCreate(504.000000, 102.000000, "--");
    	TextDrawBackgroundColor(Textdraw0, 255);
    	TextDrawFont(Textdraw0, 3);
    	TextDrawLetterSize(Textdraw0, 0.429999, 1.200000);
    	TextDrawColor(Textdraw0, 16711935);
    	TextDrawSetOutline(Textdraw0, 1);
    	TextDrawSetProportional(Textdraw0, 1);
    
    	Textdraw1 = TextDrawCreate(503.000000, 113.000000, "--");
    	TextDrawBackgroundColor(Textdraw1, 65535);
    	TextDrawFont(Textdraw1, 3);
    	TextDrawLetterSize(Textdraw1, 0.390000, 1.000000);
    	TextDrawColor(Textdraw1, -65281);
    	TextDrawSetOutline(Textdraw1, 1);
    	TextDrawSetProportional(Textdraw1, 1);
    
    	Textdraw3 = TextDrawCreate(503.000000, 134.000000, "_");
    	TextDrawBackgroundColor(Textdraw3, 255);
    	TextDrawFont(Textdraw3, 3);
    	TextDrawLetterSize(Textdraw3, 0.350000, 1.200000);
    	TextDrawColor(Textdraw3, 16777215);
    	TextDrawSetOutline(Textdraw3, 1);
    	TextDrawSetProportional(Textdraw3, 1);
    
    	Textdraw4 = TextDrawCreate(502.000000, 145.000000, "_");
    	TextDrawBackgroundColor(Textdraw4, 255);
    	TextDrawFont(Textdraw4, 3);
    	TextDrawLetterSize(Textdraw4, 0.250000, 1.300000);
    	TextDrawColor(Textdraw4, -16711681);
    	TextDrawSetOutline(Textdraw4, 1);
    	TextDrawSetProportional(Textdraw4, 1);
    
    	Textdraw6 = TextDrawCreate(556.000000, 49.000000, "--");
    	TextDrawBackgroundColor(Textdraw6, 65535);
    	TextDrawFont(Textdraw6, 3);
    	TextDrawLetterSize(Textdraw6, 0.200000, 1.300000);
    	TextDrawColor(Textdraw6, -1);
    	TextDrawSetOutline(Textdraw6, 1);
    	TextDrawSetProportional(Textdraw6, 1);
    
    	return 1;
    }
    
    public OnFilterScriptExit()
    {
    	TextDrawHideForAll(Textdraw0);
    	TextDrawDestroy(Textdraw0);
    	TextDrawHideForAll(Textdraw1);
    	TextDrawDestroy(Textdraw1);
    	TextDrawHideForAll(Textdraw3);
    	TextDrawDestroy(Textdraw3);
    	TextDrawHideForAll(Textdraw4);
    	TextDrawDestroy(Textdraw4);
    	TextDrawHideForAll(Textdraw6);
    	TextDrawDestroy(Textdraw6);
    	return 1;
    }
    forward pScore(playerid);
    public pScore(playerid)
    {
       new Str[256];
       format(Str, sizeof(Str), "Score: %d", GetPlayerScore(playerid));
       TextDrawSetString(Score[playerid], Str);
       return 1;
    }
    forward pName(playerid);
    public pName(playerid)
    {
       new Str[256];
       new ppName[MAX_PLAYER_NAME];
       GetPlayerName(playerid, ppName, sizeof(ppName));
       format(Str, sizeof(Str), "Name: %s", ppName);
       TextDrawSetString(Name[playerid], Str);
       return 1;
    }
    public Infos(playerid)
    {
    		new string[256],year,month,day;
    		getdate(year, month, day);
            format(string, sizeof string, "~r~Ping: ~w~%d", GetPlayerPing(playerid));
            TextDrawSetString(Textdraw1, string);
            format(string, sizeof string, "~r~FPS: ~w~%d", GetPlayerFPS(playerid));
            TextDrawSetString(Textdraw0, string);
            format(string, sizeof string, "%d/%s%d/%s%d", day, ((month < 10) ? ("0") : ("")), month, (year < 10) ? ("0") : (""), year);
            TextDrawSetString(Textdraw6, string);
            }
    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;
    }
    public OnPlayerDisconnect(playerid, reason)
    {
    	Save(playerid);
    	return 1;
    }
    stock Load(playerid)
    {
        new file[128];
        new name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
        format(file,sizeof(file),"/%s.ini",name);
        if(!fexist(file))
    	{
            dini_Create(file);
    	    dini_IntSet(file,"kills", PlayerInfo[playerid][kills]);
    	    dini_IntSet(file,"death", PlayerInfo[playerid][death]);
    	}
        if(fexist(file))
        {
    		PlayerInfo[playerid][kills] = dini_Int(file,"kills");
    		PlayerInfo[playerid][death] = dini_Int(file,"kills");
        }
    }
    stock Save(playerid)
    {
        new file[128];
        new name[MAX_PLAYER_NAME];
    	GetPlayerName(playerid, name, sizeof(name));
    	format(file,sizeof(file),"%s.ini",name);
    	if(fexist(file))
    	{
    	    dini_IntSet(file,"kills", PlayerInfo[playerid][kills]);
            dini_IntSet(file,"death", PlayerInfo[playerid][death]);
    
    	}
    }
    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 OnPlayerDeath(playerid, killerid, reason)
    {
        if(killerid != INVALID_PLAYER_ID)
        {
            tt(killerid);
            tt2(killerid);
            PlayerInfo[killerid][kills]++;
        }
        tt(playerid);
        tt2(playerid);
        PlayerInfo[playerid][death]++;
        return true;
    }
    
    forward tt(playerid);
    public tt(playerid)
    {
    	new str[128];
    	format(str, 128, "Kills: %d",PlayerInfo[playerid][kills]);
    	return TextDrawSetString(Text:Textdraw3, str);
    }
    
    forward tt2(playerid);
    public tt2(playerid)
    {
    	new str[128];
    	format(str, 128, "Death: %d",PlayerInfo[playerid][death]);
    	return TextDrawSetString(Text:Textdraw4, str);
    }
    public OnPlayerConnect(playerid)
    {
    Load(playerid);
    
    Score[playerid] = TextDrawCreate(502.000000, 122.000000, " ");
    TextDrawBackgroundColor(Score[playerid], -16776961);
    TextDrawFont(Score[playerid], 3);
    TextDrawLetterSize(Score[playerid], 0.290000, 1.300000);
    TextDrawColor(Score[playerid], 255);
    TextDrawSetOutline(Score[playerid], 1);
    TextDrawSetProportional(Score[playerid], 0);
    	
    Name[playerid] = TextDrawCreate(501.000000, 156.000000, " ");
    TextDrawBackgroundColor(Name[playerid], -16776961);
    TextDrawFont(Name[playerid], 3);
    TextDrawLetterSize(Name[playerid], 0.350000, 1.200000);
    TextDrawColor(Name[playerid], 16711935);
    TextDrawSetOutline(Name[playerid], 1);
    TextDrawSetProportional(Name[playerid], 1);
    return 1;
    }
    public OnPlayerSpawn(playerid)
    {
    TextDrawShowForPlayer(playerid, Textdraw6),TextDrawShowForPlayer(playerid, Textdraw4),TextDrawShowForPlayer(playerid, Textdraw3), TextDrawShowForPlayer(playerid, Name[playerid]),TextDrawShowForPlayer(playerid, Score[playerid]), TextDrawShowForPlayer(playerid, Textdraw1), TextDrawShowForPlayer(playerid, Textdraw0);
    return 1;
    }
    
  3. Hohoho Gamere , de mult nu tiam auzit vocea ))) Cind dq tiam copiat id-ul de yahoo ? x)))) ahahahaha mor de ris =)) nume da ti lam copiat cu vro 2 ani in urma :)))))) si atunci era aiureala =))) iar de topic nu va zic nimic am editat tot GM-ul in SSE + lam pastrat pe GameR la credits , ca nu sunt asa de nesimtit cum eram inainte cu KnowN sau SPEEDY ! asa ca lasativa cu topicuri de astea proaste .

  4. Dealership

     

    33upbwg.png

    Dealership:

    Hello guys. This is my second map. I created a dealership in Los Santos. My video editing skills is not very good, however, I hope you like it mrgreen.gif

    Now will be only the map, but in a second version will a FilterScript with vehicles selling.

    Specification:

    • Downstairs Dealership and 1 floor.
    • Space for 32 vehicles.
    • 5 External spaces to sample.
    • 229 Objects.

    Images

    http://imgur.com/u4tiKG0,11wSwnu,lBp...G5LBCd,gPdLbhr

    Video

    OBS: Vehicles not included. This is only objects with texture.

     

    YouTube  

    Download:

    Pastebin: http://pastebin.com/QD11gsH5

     

    Credits

    Thank you for translation Dolby

  5. [FS]Lottery / Keno
    Gambling Minigame
    30sx2jp.jpg


    Video

    https://www.youtube.com/watch?v=P54x-BKnJwg


    What is it?

    This is a fun little singleplayer gambling minigame that allows your players to bet their money on a 
    series of numbers of their liking.

    Before they start they have to select 10 numbers from 0 to 99 on their lottery-card, set their bet and 
    press the PLAY-button. The server will draw 10 random numbers 
    and the player will win a prize depending on the amount of matches and their bet. 

    This game is all textdraw-based. There is only 1 command (/lottery) to show the lottery-card, the rest is done by clickable textdraws.


    Installation

    - Download the lottery.pwn file and place it in your filterscripts-folder
    - Add 'lottery' to the filterscripts-line in your server.cfg
    - Optionally you can adjust some of the settings, like min/max bet, default jackpot and
    reward-multipliers on top of the filterscript. 
    - The jackpot will be stored in a file (will be created automatically) you can change the path in the filterscript. 


    Bugs

    - None known so far, although i haven't been able to test this will multiple players playing at the same time. 
    - Let me know if you found a bug or glitch. 


    Download
    Lottery.pwn (Mediafire)
    Lottery.pwn (Pastebin)
    I've added commentary to almost every line in this script, explaining what 
    it does so you can even learn something from it. smile.png 
    zcmd include is required. 

  6. Serios :o:O Mai lasat uimit hai sa o vad si pe asta ca pici tu necro-zone ;)) Nici 0,1% nu iti dau sanse practic 0% sanse ;))

     

    Mai bine recomand sa te las tu decat sa mai plagiezi name-urile la jucatori pe alte comunitati si name-urile de servere copil facut in eprubeta

    Ba copile ce numa am plagat ? GameR????? =))) asta citi ani in urma a fost ? x) + invata sa scrii ;)

  7.  

    Bravo baiete, foarte frumos.

    SSR v5 editat. (WoS b29 edit.)

    Mi-am dat seama ca este SSR dupa acesta functie:

    stock Log_( Table[ ], Coloana[ ], String[ ] )
    {
    new d_y, d_m, d_d, t_h, t_m, t_s;
    getdate( d_y, d_m, d_d ) ;
    gettime( t_h, t_m, t_s ) ;
    
    
    format( gsQuery, sizeof( gsQuery ), "INSERT INTO `%s` ( `%s` ) VALUES ( '%d/%d/%d - %d:%d:%d: %s' )" , Table, Coloana, d_d, d_m, d_y, t_h, t_m, t_s, String ) ;
    mysql_tquery( 1, gsQuery, "" , "" ) ;
    
    
    return ( 1 ) ;
    }

    Asa era si in SSR v5 systemul de Lotto

    #define WEEKPRIZE               "VIP Level 10"
    #define LASTWINNER              "Nobody"
    #define CURRENTNUMBER           "87"
    

    Nici macar numarul castigator "87" care l-am adaugat eu nu l-ai modificat.

    Si vrei sa spui ca server-ul este facut de tine.

     

    Vad ca ai modificat putin culorile / creditele .. atat.

    CNR System by SoNNy, si el a contribuit cu multe la acest Gamemode, cand aveam impreuna SSR-ul.

    Asa ca si el ar trebui sa apara la /credits.

    Frumos din partea ta ca nu ai pastrat creditele reale.

    In fine, nu am ce sa va cer, la ce minte avetii...

    Nu te obosi sa dai reply cu injuraturi / jigniri.. ca nu ma injosesc la mintea ta.

    -1 de la mine!

     

    Offff Gamere unde te bagi si tu nu inteleg ..... tot ce e facut de tine sa pornit de la WoS ....... si te crezi acuma mare si smecher ? :D:D:D Mai bine lasate de samp de tot absolut ;)

    • Upvote 1
  8. Hello, I made a FPS textdraw today. I took like 15 - 20 minutes (including textdraw). This is my third FS and I tested it, it works fine.

    INFO
    - Updates the textdraw every 500 milliseconds. (Changing it might cause bugs and wrong FPS detection)
    - A Good/Bad text. If player have FPS less than 20 he will see [bAD] and if he have FPS more than 20 he will see [GOOD].
    - Removed the lag problem (not using OnPlayerUpdate anymore).

    PICTURE
    e9d4530ff9e01f763c815bc1f92c90de.jpg

    BUGS
    No bugs found. Please report if you found any.

    DOWNLOAD
    http://pastebin.com/u/De4dpOol

    • Upvote 3
  9. Nu este cine stie ce gamemode, mai ales ca acum e la moda rpg-ul... :)) In fine, am folosit acest gamemode si e cam plinut de bug-uri :))

    Daca cinstit am reparat multe buguri la el ;) am muncit , nu e facut de mine , dar lam reparat cit de cit :D asa ca pa bagat pe offline ;)

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