Nec Posted January 15, 2010 Share 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 Link to comment
Nec Posted January 15, 2010 Author Share 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 Link to comment
x86 Posted January 16, 2010 Share 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? Link to comment
x86 Posted January 16, 2010 Share 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? Link to comment
Wisin Posted January 17, 2010 Share Posted January 17, 2010 i have tested it and only creates the pickup but the money dont gets droped so somthings its wrong Link to comment
Wisin Posted January 17, 2010 Share Posted January 17, 2010 i have tested it and only creates the pickup but the money dont gets droped so somthings its wrong Link to comment
bober370 Posted January 17, 2010 Share 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 ) Link to comment
bober370 Posted January 17, 2010 Share 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 ) Link to comment
robhol Posted January 17, 2010 Share 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. Link to comment
robhol Posted January 17, 2010 Share 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. Link to comment
Nec Posted January 19, 2010 Author Share Posted January 19, 2010 =\ i just need make a pickup on the dead body of his money.. and the player lose all he money Link to comment
Nec Posted January 19, 2010 Author Share Posted January 19, 2010 =\ i just need make a pickup on the dead body of his money.. and the player lose all he money 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