Xwad Posted December 27, 2014 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
3B00DG4MER Posted December 27, 2014 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
Xwad Posted December 28, 2014 Author 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?
3B00DG4MER Posted December 28, 2014 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
Xwad Posted December 29, 2014 Author 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 )
ViRuZGamiing Posted December 29, 2014 Posted December 29, 2014 1350 is already a Number, do make it a Number (remove tonumber() j
Xwad Posted December 29, 2014 Author 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 )
3B00DG4MER Posted December 29, 2014 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 ?
MTA Team botder Posted December 29, 2014 MTA Team 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.
Xwad Posted December 29, 2014 Author Posted December 29, 2014 what? what should i do now?? it does now work
xeon17 Posted December 29, 2014 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.
Xwad Posted December 29, 2014 Author Posted December 29, 2014 oh ok but i have a disable teamkill script so i dont need this script anymore but thanks your help!
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