Castillo Posted May 3, 2010 Posted May 3, 2010 (edited) hey, i have a money drop script, but i wont when the player suicides lose his money, someone know how to do when he suicide dont lose it? here is my code code removed Edited May 3, 2010 by Guest San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
dzek (varez) Posted May 3, 2010 Posted May 3, 2010 in playerJustGotDied check if theres "attacker" variable set to element.. if theres no attacker = suicide.. 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)!
Castillo Posted May 3, 2010 Author Posted May 3, 2010 (edited) in playerJustGotDied check if theres "attacker" variable set to element.. if theres no attacker = suicide.. I think it works what i did but i dint tested with another player, here is the code code removed Edited May 3, 2010 by Guest San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
dzek (varez) Posted May 3, 2010 Posted May 3, 2010 function playerJustGotDied(ammo, attacker, weapon, bodypart) if (attacker ~= source) and (attacker ~= nil) then cancelEvent() else createMoney(source); end end Duude!! cancelEvent ??!! You want to cancel death? function playerJustGotDied(ammo, attacker, weapon, bodypart) if (isElement(attacker)) then createMoney(source) end -- no need for else.. we just do nothing 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)!
Castillo Posted May 3, 2010 Author Posted May 3, 2010 Ohhh, thanks varez San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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