Jump to content

help please


Kenix

Recommended Posts

Posted

I have made a script that when at the player of 90 hp plays a sound of knock of heart. But the script doesn't work help please!

  
local HP = getLocalPlayer() 
heartsoundPlayer = function() 
        local localHealth = getElementHealth(HP) 
        if localHealth < 90 then 
        playSound("heart.mp3", false) 
         setSoundVolume(sound, 2.5) -- set the sound volume to 50% 
        end 
      end 
addEventHandler("onClientPlayerDamage", HP, heartsoundPlayer) 
  

http://vk.com/the_kenix

Вопросы задавайте на форуме, не пишите мне в личку.

Please don't pm me.

Posted

wtf is line 3?

i havent heard about defining functions like that..

replace with

function heartsoundPlayer() 

also line 7 - setting volume over 1 has NO EFFECT (and comment on that line saying something about 50% is false)

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

Only there is a problem this sound always plays as to make that it didn't play after death?

http://vk.com/the_kenix

Вопросы задавайте на форуме, не пишите мне в личку.

Please don't pm me.

Posted

whaat?

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

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