Nec Posted January 15, 2010 Posted January 15, 2010 bool setPlayerMoney (int amount ) function setCash ( thePlayer, command, amount ) setPlayerMoney ( thePlayer, tonumber(amount) ) addCommandHandler ( "dardinero", setCash ) i need a script to drop all the money on your hand like a rpg
Nec Posted January 15, 2010 Author Posted January 15, 2010 bool setPlayerMoney (int amount ) function setCash ( thePlayer, command, amount ) setPlayerMoney ( thePlayer, tonumber(amount) ) addCommandHandler ( "dardinero", setCash ) i need a script to drop all the money on your hand like a rpg
x86 Posted January 16, 2010 Posted January 16, 2010 bool setPlayerMoney (int amount )function setCash ( thePlayer, command, amount ) setPlayerMoney ( thePlayer, tonumber(amount) ) addCommandHandler ( "dardinero", setCash ) i need a script to drop all the money on your hand like a rpg -- Not tested addEventHandler("onPlayerWasted", getRootElement(), function() local player = source local money = getPlayerMoney(player) local x, y, z = getElementPosition(player) createPickup(x, y, z, 3, 1274, 0, money) end ) Is this what you mean?
x86 Posted January 16, 2010 Posted January 16, 2010 bool setPlayerMoney (int amount )function setCash ( thePlayer, command, amount ) setPlayerMoney ( thePlayer, tonumber(amount) ) addCommandHandler ( "dardinero", setCash ) i need a script to drop all the money on your hand like a rpg -- Not tested addEventHandler("onPlayerWasted", getRootElement(), function() local player = source local money = getPlayerMoney(player) local x, y, z = getElementPosition(player) createPickup(x, y, z, 3, 1274, 0, money) end ) Is this what you mean?
Wisin Posted January 17, 2010 Posted January 17, 2010 i have tested it and only creates the pickup but the money dont gets droped so somthings its wrong
Wisin Posted January 17, 2010 Posted January 17, 2010 i have tested it and only creates the pickup but the money dont gets droped so somthings its wrong
bober370 Posted January 17, 2010 Posted January 17, 2010 mayba -- Not tested function money(playerSource) local money = getPlayerMoney(playerSource) local x, y, z = getElementPosition(playerSource) createPickup(x, y, z, 3, 1274, 0, money) end addEventHandler("onPlayerWasted", getRootElement(), money )
bober370 Posted January 17, 2010 Posted January 17, 2010 mayba -- Not tested function money(playerSource) local money = getPlayerMoney(playerSource) local x, y, z = getElementPosition(playerSource) createPickup(x, y, z, 3, 1274, 0, money) end addEventHandler("onPlayerWasted", getRootElement(), money )
robhol Posted January 17, 2010 Posted January 17, 2010 mayba -- Not tested function money(playerSource) local money = getPlayerMoney(playerSource) local x, y, z = getElementPosition(playerSource) createPickup(x, y, z, 3, 1274, 0, money) end addEventHandler("onPlayerWasted", getRootElement(), money ) Two problems: 1) You're creating the pickup on top of the player. I'm not sure, but that could be a problem, I guess... 2) You're not removing the player's money. Use takePlayerMoney.
robhol Posted January 17, 2010 Posted January 17, 2010 mayba -- Not tested function money(playerSource) local money = getPlayerMoney(playerSource) local x, y, z = getElementPosition(playerSource) createPickup(x, y, z, 3, 1274, 0, money) end addEventHandler("onPlayerWasted", getRootElement(), money ) Two problems: 1) You're creating the pickup on top of the player. I'm not sure, but that could be a problem, I guess... 2) You're not removing the player's money. Use takePlayerMoney.
Nec Posted January 19, 2010 Author Posted January 19, 2010 =\ i just need make a pickup on the dead body of his money.. and the player lose all he money
Nec Posted January 19, 2010 Author Posted January 19, 2010 =\ i just need make a pickup on the dead body of his money.. and the player lose all he money
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