20.08.2012, 09:57
New version is now public.You can export functions now.For example;
test.lua:
test2.lua
Like this,
The first string in export, what's the function name to export other scripts
Second parameter is which function..
test.lua:
pawn Код:
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);
pawn Код:
exports.test:IsValidAge(21);
// or
call("CAccount", "IsValidAge", 21);
The first string in export, what's the function name to export other scripts
Second parameter is which function..