Jump to content

Player-Warp-O-Bat!


DhrJay

Recommended Posts

function changePos( attacker, weapon, bodypart, loss ) 
if (weapon == 5) then 
setElementPosition(source, x, y, z) --change the x, y, z to your coordinates 
end 
end 
addEventHandler("onPlayerDamage", root, changePos) 

Untested.

Thanks dude!

Saved this as a .lua + I made a meta file like this:

<meta> 
    <script src="warpobat.lua"/> 
  
    <export function="changePos" type="server" /> 
    <export function="setElementPosition" type="server"/> 
    <export function="addEventHandler" type="server"/> 
     
</meta> 

And saved it as meta.xml

Is this the right way?

-Jay

Link to comment
function="changePos" type="server" /> 
    function="setElementPosition" type="server"/> 
    function="addEventHandler" type="server"/> 

Is that a kind of joke? remove it.

Relax man... I was trying...xD! I've never scripted before...but I want to learn how to do it.

Saw it in an other resource's meta...Toughed it needed to be there.

I will remove it, thanks...

-Jay

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