RootBey Posted September 2, 2018 Share Posted September 2, 2018 (edited) When the player dies, half the money falls. Other people collect money from the ground help me pls Edited September 2, 2018 by RootBey Link to comment
sanyisasha Posted September 2, 2018 Share Posted September 2, 2018 (edited) You need an eventHandler, called onPlayerWasted. When itt calls, first half the money. You can do it by local halfMoney = getPlayerMoney(player)/2 setPlayerMoney(player,halfMoney) Then make an object to the player position by: local x,y,z = getElementPosition(player) local moneyPickup = createPickup(x,y,z,3,1212) setElementData(moneyPickup, 'halfMoney', halfMoney) And then, you can call another event where you handle the pickup: addEventHandler('onPickupHit',moneyPickup,function(player) local halfMoney = getElementData(source, 'halfMoney') givePlayerMoney(player,halfMoney) destroyElement(source) end) And if someone pickups it, destroy the pickup. Another method is create simple object, and on player hit the object destroy it. Edited September 2, 2018 by sanyisasha 1 Link to comment
RootBey Posted September 2, 2018 Author Share Posted September 2, 2018 4 hours ago, sanyisasha said: PlayerWasted adlı bir eventHandler'a ihtiyacınız var. Ne zaman arar, ilk yarısı para. Bunu yapabilirsin Sonra oyuncu pozisyonuna bir nesne yapın: Ardından, teslim almayı gerçekleştirdiğiniz başka bir etkinliği arayabilirsiniz: Ve eğer birileri onu alırsa, toplayıcıyı yok edin. Başka bir yöntem basit bir nesne oluşturmaktır ve oyuncu üzerine vurmak nesneyi yok eder. Thank you beat man Can you put it in a script and give it to me? ı dont use lua pls can you help me . Link to comment
sanyisasha Posted September 2, 2018 Share Posted September 2, 2018 19 minutes ago, RootBey said: Thank you beat man Can you put it in a script and give it to me? ı dont use lua pls can you help me . If you don't script in lua, why need this script? 1 Link to comment
RootBey Posted September 2, 2018 Author Share Posted September 2, 2018 21 minutes ago, sanyisasha said: Eğer luada yazmazsan, neden bu senaryoya ihtiyacın var? To use it on my own server ? Link to comment
sanyisasha Posted September 2, 2018 Share Posted September 2, 2018 1 minute ago, RootBey said: To use it on my own server ? Lol you translate it? I see this: Eğer luada yazmazsan, neden bu senaryoya ihtiyacın var? If you want to make an own server, learn first scripting, or pay someone to make it for you. 1 Link to comment
RootBey Posted September 2, 2018 Author Share Posted September 2, 2018 16 minutes ago, sanyisasha said: Lol you translate it? I see this: Eğer luada yazmazsan, neden bu senaryoya ihtiyacın var? If you want to make an own server, learn first scripting, or pay someone to make it for you. Yes bro ım a trasnlate , bro ı dont understand lua , after summer go to lua cours . Pls bro can you help me ? Link to comment
Gordon_G Posted September 2, 2018 Share Posted September 2, 2018 You don't need to be a pro-lua scripter to copy that code and put it in a .lua file. Just read the scripting introduction on the wiki and you'll know what to do. 1 Link to comment
RootBey Posted September 2, 2018 Author Share Posted September 2, 2018 3 minutes ago, Gordon_G said: Bu kodu kopyalamak ve bir .lua dosyasına koymak için bir pro-lua betik olmanıza gerek yoktur. Sadece wiki'deki betik girişini okuyun ve ne yapacağınızı bilirsiniz. Thank you bro , good night Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now