Jump to content

[HELP] triggered serverside error


Recommended Posts

Help me pls, i need your help. i dont know where's the problem. pls man :'( 

function playerDropAItem(itemName)
    local x,y,z = getElementPosition(source)
    local item,itemString = getItemTablePosition(itemName)
    local itemPickup = createItemPickup(item,x+math.random(-1.25,1.25),y+math.random(-1.25,1.25),z,itemString)
end
addEvent( "playerDropAItem", true )
	<export function="playerDropAItem" type="server" />		

17761281_1458318244199862_1242069550_o.p

Link to comment
3 hours ago, daffabahy said:

Help me pls, i need your help. i dont know where's the problem. pls man :'( 


function playerDropAItem(itemName)
    local x,y,z = getElementPosition(source)
    local item,itemString = getItemTablePosition(itemName)
    local itemPickup = createItemPickup(item,x+math.random(-1.25,1.25),y+math.random(-1.25,1.25),z,itemString)
end
addEvent( "playerDropAItem", true )

	<export function="playerDropAItem" type="server" />		

17761281_1458318244199862_1242069550_o.p

function playerDropAItem(itemName)
    local player = client
    if client then
    local x,y,z = getElementPosition(player)
    local item,itemString = getItemTablePosition(itemName)
    local itemPickup = createItemPickup(item,x+math.random(-1.25,1.25),y+math.random(-1.25,1.25),z,itemString)
    end
end
addEvent( "playerDropAItem", true )
addEventHandler( "playerDropAItem", getRootElement(),playerDropAItem)

This might help you

  • Like 1
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...