Ulysses Stuff > Releases
Uppl -- Ulysses Per Prop Limit. Restrict specified props to a certain number!
JamminR:
The example you posted doesn't have quotes. I almost answered no
Megiddo:
The short answer is yes. I didn't want to get technical. :P
You can do it without quotes if there's no spaces in the name, but just to be safe we should probably tell people yes. :)
Chironex:
Hi, I have trouble adding a log message in uppl:
--- Code: ---local function cc_upplAdd( ply, command, argv )
if ply:IsValid() and not (ply:IsAdmin() or ply:IsSuperAdmin()) then
ULib.tsay( ply, "You are not an admin!" )
return
end
local err -- Check for errors
if #argv < 2 then
err = "You need at least two arguments for this command."
elseif not file.Exists( "../" .. argv[ 1 ] ) then
err = "That model (" .. argv[ 1 ] .. ") does not exist."
elseif not tonumber( argv[ 2 ] ) or tonumber( argv[ 2 ] ) < 0 then
err = "Invalid number for model " .. argv[ 1 ] .. " " .. argv[ 2 ]
end
if err then
if ply:IsValid() then
ULib.tsay( ply, err )
else
Msg( err .. "\n" )
end
return
end
-- Now we should be error free!
--I've just added this message:
ulx.logServAct( ply, "#A limited model '" .. argv[ 1 ] .. "' to " .. argv[ 2 ] .. " units per player." )
LimitModel( argv[ 1 ], tonumber( argv[ 2 ] ) )
end
concommand.Add( "uppl_add", cc_upplAdd )
--- End code ---
But this silently crash the script. I've also tried a simple message ulx.logServAct( ply, "hello" )
What i do wrong ?
Cornflake:
Hi all,
I'd like to use this to limit people from spawning more than one certain SENT (specifically, the Stargate DHD) and I typed in two paths to .mdl (one with the addons path and one without). For some reason, though, it doesn't seem to take effect. Does this only work for props or does it work for SENTS too?
I typed this in:
--- Code: ---uppl_add "models/dhd/dhd.mdl" 1
--- End code ---
and
--- Code: ---uppl_add "addons/stargate/models/dhd/dhd.mdl" 1
--- End code ---
But neither of them worked. If this does not work for SENTs, can you point me towards an addon that does? Thanks.
Megiddo:
It does not work for sents and I do not know of any that does.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version