Jump to content

HELP Player kill reward script!


Xwad

Recommended Posts

Posted

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 )

Posted

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 )

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

addCommandHandler passes serverside the player element as first argument whereas clientside it passes the command name as first argument.

The code is serverside.

Posted

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.

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