Jump to content

Attach Player to Player


Namorek

Recommended Posts

Posted

Hi all, How it work Attach Player to Player? Player write /Arrest [Nick] a Player has arrest by Player and Player on arrest the player anim

Posted

haha, epic drawing :D

im not sure if its possible to attach player to player, your code looks ok, does it throw any error/warning? are you sure you put it server side?

yes, detachElements will be ok

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

varez? Sorry you because wast quarrel Very sorry you!

Doesn't work my Code!

function attach ( thePlayer, command, who )
local arrest =  getPlayerFromName ( who )
attachElements ( arrest, thePlayer, 0, 2, 0 )
end
addCommandHandler ( "arrest", attach )
 
function dettach ( thePlayer, command, who )
local unarrest =  getPlayerFromName ( who )
detachElements ( unarrest, thePlayer, 0, 2, 0 ) 
end
addCommandHandler ( "unarrest", dettach )

Help me!

  • Moderators
Posted

How about this:

function attach ( thePlayer, command, who )
local arrest =  getPlayerFromName ( who )
attachElements ( arrest, thePlayer, 0, 2, 0 )
end
addCommandHandler ( "arrest", attach )
 
function dettach ( thePlayer, command, who )
local unarrest =  getPlayerFromName ( who )
detachElements ( unarrest, thePlayer ) 
end
addCommandHandler ( "unarrest", dettach )

detachElements hasn't got code for additional coordinates - You should have read the function on wiki.

detachElements ( element theElement, [ element theAttachToElement ] ) -- no coordinate arguments

Posted
How about this:
function attach ( thePlayer, command, who )
local arrest =  getPlayerFromName ( who )
attachElements ( arrest, thePlayer, 0, 2, 0 )
end
addCommandHandler ( "arrest", attach )
 
function dettach ( thePlayer, command, who )
local unarrest =  getPlayerFromName ( who )
detachElements ( unarrest, thePlayer ) 
end
addCommandHandler ( "unarrest", dettach )

detachElements hasn't got code for additional coordinates - You should have read the function on wiki.

detachElements ( element theElement, [ element theAttachToElement ] ) -- no coordinate arguments

Where to Enter Animation??

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