Jump to content

[SOLVED]Help Please!


-RoCk-Alex

Recommended Posts

Sure , if i know right , you have to make a server side like this :

  
-- Server Side 
  
function lol() 
triggerClientEvent(source,"theBastardDied",source) 
end 
addEventHandler("onPlayerWasted",getRootElement(),lol) 

And in the clientside , just use dxDrawImage , addEventHandler , and a setTimer to removeEventHandler..

Btw , don't forget to add the image in meta.xml too :)

Good Luck.

Link to comment
Sure , if i know right , you have to make a server side like this :

  
-- Server Side 
  
function lol() 
triggerClientEvent(source,"theBastardDied",source) 
end 
addEventHandler("onPlayerWasted",getRootElement(),lol) 

Good Luck.

i can't figure out was that a help or you are just taunting with those words? :|

Link to comment
Sure , if i know right , you have to make a server side like this :

  
-- Server Side 
  
function lol() 
triggerClientEvent(source,"theBastardDied",source) 
end 
addEventHandler("onPlayerWasted",getRootElement(),lol) 

And in the clientside , just use dxDrawImage , addEventHandler , and a setTimer to removeEventHandler..

Btw , don't forget to add the image in meta.xml too :)

Good Luck.

Why should he use onPlayerWasted instead of onClientPlayerWasted which would be a lot easier for him.

Link to comment
local x,y,w,h = 0.1, 0.1, 0.7, 0.5 
local blood = guiCreateStaticImage(x,y,w,h,"images/wasted.png",true) 
guiSetVisible(blood, false) 
  
function wasted (killer, weapon, bodypart) 
    guiSetVisible(blood, true) 
    setTimer (guiSetVisible, 5000, 1, blood, false ) 
end 
addEventHandler("onClientPlayerWasted", getLocalPlayer(), wasted) 
  

I made this te other day.Maybe can help you :)

just change seconds showing or image resolution and position

Edited by Guest
Link to comment
Sure , if i know right , you have to make a server side like this :

  
-- Server Side 
  
function lol() 
triggerClientEvent(source,"theBastardDied",source) 
end 
addEventHandler("onPlayerWasted",getRootElement(),lol) 

And in the clientside , just use dxDrawImage , addEventHandler , and a setTimer to removeEventHandler..

Btw , don't forget to add the image in meta.xml too :)

Good Luck.

Why should he use onPlayerWasted instead of onClientPlayerWasted which would be a lot easier for him.

Ah , right , i forgot about that :)

@Alex , try this script

  
function bastardWasted() 
drawImage() 
destroyImage() 
end 
addEventHandler("onClientPlayerWasted",getRootElement(),bastardWasted) 
  
function destroyImage() 
setTimer( function () 
removeEventHandler("onClientRender",getRootElement(),drawImage) 
end,1000,1) -- Change here the time .. "1000" is what you want to change. 
end 
  
function drawImage() 
dxDrawImage(Arguments here) 
end 
addEventHandler("onClientRender",getRootElement(),drawImage) 
  

This code will put the image for 1 second , also you must put the arguments in dxDrawImage

Don't forget to put the image in meta.xml

Link to comment

Ah , right , i forgot about that :)

@Alex , try this script

  
function bastardWasted() 
drawImage() 
destroyImage() 
end 
addEventHandler("onClientPlayerWasted",getRootElement(),bastardWasted) 
  
function destroyImage() 
setTimer( function () 
removeEventHandler("onClientRender",getRootElement(),drawImage) 
end,1000,1) -- Change here the time .. "1000" is what you want to change. 
end 
  
function drawImage() 
dxDrawImage(Arguments here) 
end 
addEventHandler("onClientRender",getRootElement(),drawImage) 
  

This code will put the image for 1 second , also you must put the arguments in dxDrawImage

Don't forget to put the image in meta.xml

function bastardWasted() 
addEventHandler("onClientRender",root,drawImage) 
setTimer(function() removeEventHandler("onClientRender",root,drawImage) end,1000,1) 
end 
addEventHandler("onClientPlayerWasted",localPlayer,bastardWasted) 
  
function drawImage() 
dxDrawImage(Arguments here) 
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...