Jump to content

Help bad usage


Recommended Posts

Posted

function copyright(player)
outputChatBox ("#FF0000FLY#0099FFTurk#990000FreeRoam", getRootElement(), 255, 255, 255, true )
outputChatBox ("#009977İyi Oyunlar Diler...", getRootElement(), 255, 255, 255, true ) 
end
addEventHandler("onResourceStart", getRootElement(), copyright)



function pajero(source)
local x,y,z = getElementPosition(source)
setPedAnimation (source, "FIGHT_B", "FIGHTB_G", -1, false, false, false, true)
triggerClientEvent( source, "invocar2", source )
setTimer ( function()
local pajaro = createObject(2673, x, y, z)
setElementCollisionsEnabled (pajaro, false)
local pajerito = createVehicle ( 415, x, y, z+80 )
attachElements(pajaro, pajerito,-0.5,0,0.1,0,270,0)
setElementAlpha(pajerito, 0) 
warpPedIntoVehicle ( source, pajerito ) 
addEventHandler ( "onVehicleExplode", root, culiao )
addEventHandler ( "onPlayerQuit", root, culiao )
addEventHandler ( "onVehicleExit", root, culiao )
setPedAnimation (source, "bikeleap", "bk_blnce_in", -1, false, false, false, true)
triggerClientEvent(source, "Rhypasa", source)
		end, 1000, 1 )
end
addCommandHandler("kartal", pajero)


function culiao ()
	removeEventHandler ( "onVehicleExplode", root, culiao)
	removeEventHandler ( "onPlayerQuit", root, culiao )
	removeEventHandler ( "onVehicleExit", root, culiao )
    local pajaritos = getAttachedElements ( source )
    for i,v in ipairs ( pajaritos) do
        detachElements ( v, source )
		destroyElement(v)
    end
end


function asd(source)
triggerClientEvent(source, "Rhypasan", source)
end
addEventHandler("onVehicleExit", root, asd)

[2018-07-10 13:09:14] WARNING: [gameplay]/sc-kartaluc/server.lua:40: Bad argument @ 'detachElements' [Expected element at argument 1, got boolean]
[2018-07-10 13:09:14] WARNING: [gameplay]/sc-kartaluc/server.lua:41: Bad argument @ 'destroyElement' [Expected element at argument 1, got boolean]
[2018-07-10 14:06:53] WARNING: [gameplay]/sc-kartaluc/server.lua:24: Bad usage @ 'addEventHandler' ['onVehicleExplode' with this function is already handled]
[2018-07-10 14:06:53] WARNING: [gameplay]/sc-kartaluc/server.lua:25: Bad usage @ 'addEventHandler' ['onPlayerQuit' with this function is already handled]
[2018-07-10 14:06:53] WARNING: [gameplay]/sc-kartaluc/server.lua:26: Bad usage @ 'addEventHandler' ['onVehicleExit' with this function is already handled]

 

can you help me ?

 

Posted

Change the v variable to source and remove the last line with onVehicleExit

  • Like 1

If I helped you, make sure you click the reaction button on the right to support me!
It will grant me more visibility and will help me to help others!

If you have any kind of request or subject you would like to discuss about with me,
don't hesitate to send me a private message about it!

 

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