Jump to content

[HELP] Script does not work


Recommended Posts

Debugscript, no warning, no error.

Not an error but does not work.

addEventHandler("onClientResourceStart", resourceRoot,

function()

addEventHandler("onClientGUIClick", SoyguncuButon, Soygun, false)

end)

function Soygun(thePlayer,localPlayer)

if not getPedWeapon(localPlayer) then

givePedWeapon(thePlayer,31,200,true)

end

end

Link to comment
addEventHandler("onClientResourceStart", resourceRoot, 
function() 
addEventHandler("onClientGUIClick", SoyguncuButon, Soygun, false) 
end) 
  
function Soygun() 
if not getPedWeapon(localPlayer) then 
givePedWeapon(localPlayer,31,200,true) 
end 
end 

Link to comment

Put this code in server side;

addEvent ( "silahver", true ) 
addEventHandler ( "silahver", root, 
    function ( ) 
        setElementPosition ( client, 442, -1312, 15.5 )  
        giveWeapon ( client, 31, 200 ,true ) 
    end 
) 

go to client side and modify the Soygun function by this function:

function Soygun ( )  
    triggerServerEvent ( "silahver", localPlayer ) 
end 

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