Jump to content

What is this for?


GamerDeMTA

Recommended Posts

Posted

There's no "difference", since you can use your own names instead of "player" you can put "monkey" and it would still work as long as you use "monkey". 'source' is defined by MTA, used for events.

  • Moderators
Posted

Define source as argument isn't very smart. Source only gets created by events as solidsnake said.

A addCommandHandler don't have any source if you using it.

server side

addCommandHanlder("test", 
function (player) 
  
end) 
  
-- VS -- 
  
addEventHandler("onPlayerWasted",root, 
function() 
local player = source 
end) 

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