Xwad Posted December 27, 2014 Share Posted December 27, 2014 Hi i want to add a script to my MTA server that allow players to give money if they kill another player.help pls Link to comment
3B00DG4MER Posted December 27, 2014 Share Posted December 27, 2014 Hi i want to add a script to my MTA server that allow players to give money if they kill another player.help pls "onPlayerWasted" givePlayerMoney Link to comment
3B00DG4MER Posted December 28, 2014 Share Posted December 28, 2014 Thanks! You're Welcome Link to comment
Xwad Posted December 28, 2014 Author Share Posted December 28, 2014 One more quesiton! How can i do that if a player kills his teammate in classic deathmatch then he will lost money? Link to comment
3B00DG4MER Posted December 28, 2014 Share Posted December 28, 2014 One more quesiton! How can i do that if a player kills his teammate in classic deathmatch then he will lost money? Next time use https://wiki.multitheftauto.com/wiki/Main_Page ! takePlayerMoney Link to comment
Xwad Posted December 29, 2014 Author Share Posted December 29, 2014 it does not work:( i have did this Meta.xml teamkill.lua function takeCash ( thePlayer, command, amount ) -- when the takecash command is called takePlayerMoney ( thePlayer, tonumber(1350) ) -- take the amount of money from the player end addCommandHandler ( "takecash", takeCash ) Link to comment
ViRuZGamiing Posted December 29, 2014 Share Posted December 29, 2014 1350 is already a Number, do make it a Number (remove tonumber() j Link to comment
Xwad Posted December 29, 2014 Author Share Posted December 29, 2014 is it so goos? function takeCash ( thePlayer, command, 1349 ) -- when the takecash command is called takePlayerMoney ( thePlayer ) -- take the amount of money from the player end addCommandHandler ( "takecash", takeCash ) Link to comment
3B00DG4MER Posted December 29, 2014 Share Posted December 29, 2014 is it so goos?function takeCash ( thePlayer, command, 1349 ) -- when the takecash command is called takePlayerMoney ( thePlayer ) -- take the amount of money from the player end addCommandHandler ( "takecash", takeCash ) This is client or Server ? Link to comment
MTA Team botder Posted December 29, 2014 MTA Team Share Posted December 29, 2014 addCommandHandler passes serverside the player element as first argument whereas clientside it passes the command name as first argument. The code is serverside. Link to comment
Xwad Posted December 29, 2014 Author Share Posted December 29, 2014 what? what should i do now?? it does now work Link to comment
xeon17 Posted December 29, 2014 Share Posted December 29, 2014 You copied the code from wiki example, have you even readed what the code do?.. This example takes money from a player when he types "takecash number" in the console. Link to comment
Xwad Posted December 29, 2014 Author Share Posted December 29, 2014 oh ok but i have a disable teamkill script so i dont need this script anymore but thanks your help! 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