Jump to content

createExplosion


ThePCGuy

Recommended Posts

You can use these arguments ( client-side)

  
makeSound: A boolean specifying whether the explosion should be heard or not. 
camShake: A float specifying the camera shake's intensity. 
damaging: A boolean specifying whether the explosion should cause damage or not. 
  

Link to comment
No i made a server sided function that activates the client sided function, but i want to call that server sided function with a timer that's not in the same lua file.

Not in a same lua file? If the function is not local you can call it from any file in that resource (of the same type client/server). If it's another resource, just export the function.

Link to comment

I've got another problem, i called a server function with triggerServerEvent, but debugscript gives me a error that the server sided event is not added, but it is.

ERROR: Client (Merry) triggered serverside event checkForDrunk, but event is not added serverside

Link to comment
I've got another problem, i called a server function with triggerServerEvent, but debugscript gives me a error that the server sided event is not added, but it is.

ERROR: Client (Merry) triggered serverside event checkForDrunk, but event is not added serverside

show the scrip where you added the event ?

Link to comment

Well, this is a function from the server side part:

function checkDrunkLevel(charID) 
    local result = mysql_query(handler, "SELECT * FROM `chars` WHERE `id` = '" .. (charID) .. "'") 
    local row = mysql_fetch_assoc(result) 
    charID = row["id"] 
    drunkLevel = row["alcoholpercentage"] 
    triggerClientEvent("theBlurShizzle", getRootElement(), drunkLevel) 
end 
addEvent( "checkForDrunk", true ) 
addEventHandler( "checkForDrunk", getRootElement(), checkDrunkLevel ) 

And this is a part from the client side:

function triggerDrunkLevelCheck() 
    playerID = getLocalPlayer() 
    triggerServerEvent( "checkForDrunk", getLocalPlayer(), playerID ) 
end 
addEventHandler("onClientPreRender", root, triggerDrunkLevelCheck) 

Link to comment

Well, i'm somewhat closer to the problem. When i run the script it gives on error on every player.

Here:

ERROR: Client (Merry) triggered serverside event checkForDrunk, but event is not added serverside

ERROR: Client (Chuckie) triggered serverside event checkForDrunk, but event is not added serverside

So, someone have a clue what is going on here?

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