Jump to content

money drop


Recommended Posts

Posted (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 by Guest

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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)!

Posted (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 by Guest

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
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)!

Posted

Ohhh, thanks varez :)

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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