Sign in to follow this  
Followers 0
CrystalMV

My scripts website

52 posts in this topic

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
1 person likes this

Share this post


Link to post

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

Share this post


Link to post

Maybe I will include those features in the future. And nice paintings, by the way :)

Share this post


Link to post

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 

Share this post


Link to post

About your drawtag ressource. How can i save the tags into an xml file or mysql table?

Only saving the createElement arguments?

Share this post


Link to post

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.

Share this post


Link to post

Good job :)

Share this post


Link to post

Good idea. That is much more meaningful.

Share this post


Link to post

amazing resource :) will good for rp/g servers ;d and others

Share this post


Link to post

"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!"

Share this post


Link to post

piXERl.jpg

DxDrawMaterialLine3D is it ?

That looks great :-) . Are you going to release that to the community ?

Share this post


Link to post

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

Share this post


Link to post

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 :)

Share this post


Link to post

How do I save a tag and load a tag ? I can't quite figure that out.

Share this post


Link to post

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.

Share this post


Link to post

I'm a big fan of all your scripts. Bone_attach and particle_effects have been very useful.

Share this post


Link to post

I remember seeing that drawtag script years ago, it blew my mind. Very impressive. :)

Share this post


Link to post

hey, i cant figure out how to make it save and load the tags, can you make a tutorial or try to explain please? id really apreciate that, thanks.

Share this post


Link to post

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.

Share this post


Link to post

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
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.