Jump to content

My scripts website


DiSaMe

Recommended Posts

I thought it would be a good idea to make a website where I would put my MTA scripts.

http://crystalmv.net84.net

It currently includes:


  • Airbrake
    airbrake.jpg
    Bone attachments
    bone_attach.jpg
    Bytedata
    Drawtag
    drawtag.jpg
    Gravity gun
    ggun.jpg
    Lava flood
    lavaflood.jpg
    NPC high-level control (HLC)
    npc_hlc.jpg
    NPC HLC traffic
    npchlc_traffic.jpg
    NPC HLC traffic editor
    npchlc_traffic_editor.jpg
    NPC task sequencer
    npc_tseq.jpg
    Particle objects
    particles.jpg
    Server collisions
    Sticky fishes
    sticky_fishes.jpg
    Traffic light sequence
    tl_sequence.jpg

Edited by Guest
  • Like 1
Link to comment

Keep up the work!

edit: I added size thingies to your brush script, probably not the optimal implementation, but it works. :D I'd like to request an always showing brush over your mouse, perhaps at 50% opacity so you can see where you're going to draw. If you want my size code just let me know :) it's very simple, just makes your size variables a global and sets the line to size*2

VZXH9l.jpg

And some fun I had :)

piXERl.jpg

Link to comment

http://pastebin.com/DQh3miZq It's rather simple :) but it works great!

Edit: I forgot, you need to change the function drawToPicture!

function drawToPicture(x,y) 
    if not isCursorShowing() then return end 
    dxSetBlendMode("modulate_add") 
    local cx,cy = getCursorPosition() 
    local sw,sh = guiGetScreenSize() 
    cx,cy = cx*sw-x,cy*sh-y 
    cx,cy = cx,cy 
    if drawing then 
        dxSetRenderTarget(drawdest) 
        local color = tocolor(colors.r[active_color],colors.g[active_color],colors.b[active_color],255) 
        dxDrawLine(px,py,cx,cy,color,(brush_size*2)) 
        drawCircle(px,py,brush_size,color) 
        drawCircle(cx,cy,brush_size,color) 
        dxSetRenderTarget() 
        can_spray = true 
    end 
    px,py = cx,cy 
end 

Link to comment

The script uses element data, so you need to get and set it on saving and loading. But some functions are attached to element data change events, so I don't know how stability will be affected. I will probably make functions for creating tags and getting information about them which could be called from other resources.

Link to comment
  • 2 weeks later...

"Nice gun you have here kid. But having a gun on the street is prohibited in here." told me the policeman.

And then they were drawing stuffs on the walls and dancing

Finally, they came back to me and said:

"Hey kid, what the f**k did you draw on the walls, you better clean it all or we'll have to arrest you!"

Link to comment

I released it:

Amazing work on DrawTag 1.1! Your size changer is way cooler than mine :lol:

Well, yeah, but you were first to do it :) I didn't do it in the first version because I'm not going to turn the script into professional image editing software anyway :)

Link to comment

Drawtag exports two functions for that purpose, createTagFromExistingData and getTagData. You can read about them in readme.html. Also, you can look at save_tags.lua in drawtag_bc to see how it uses the functions. It stores texture data into binary file and the rest of element data into XML file.

Link to comment

drawtag_bc does that automatically when you stop either drawtag or drawtag_bc and loads when you start both of them. If you want to make a tag saving script yourself, there are two exported functions, getTagData and createTagFromExistingData, which you can read about in readme.html. You can also look at save_tags.lua in drawtag_bc if you need an example.

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...