19.08.2012, 12:53
Exporting function from Script to other scripts completed.
0.2.1 is still developing...
0.2.1 is still developing...
function IsValidAge(_match_str)
if (not tonumber(_match_str)) then return false; end
return tonumber(_match_str)>7 and tonumber(_match_str) <= 125;
end
export("IsValidAge",IsValidAge);
exports.test:IsValidAge(21);
// or
call("CAccount", "IsValidAge", 21);
I want to get an example with addEventHandler, because i got error: Bad argument @ addEventHandler
|
New download added, fixed some bugs..
addEventHandler(name, rootID, function) rootID = Event called for who, -1 is for all addEventHandler('onPlayerConnect', -1, function) -- all players addEventHandler('onPlayerConnect',0,function) -- for id 0 only rootID usually first parameter in the publics. |
I read almost all the replies about LUA used by MTA. I'm pretty sure that it's also used mostly for new mods and source engine (CSS, GarrysMod etc...).
|