General > Developers Corner
Lua Help
Stickly Man!:
--- Quote from: Major_Pain on August 31, 2009, 03:38:08 PM ---Edit: Still doesn't work and it says this in chat: "Welcome to 61100st! We're playing"
--- End quote ---
Random question, are you using or have you tested XGUI at all? I noticed my listen server saying that a while ago, I just hope it wasn't something I did :o
EDIT: Never mind, I saw your post in the XGUI thread.. do you remember exactly when it started saying this?
Major_Pain:
--- Quote from: Stickly Man! on August 31, 2009, 11:41:14 PM ---Random question, are you using or have you tested XGUI at all? I noticed my listen server saying that a while ago, I just hope it wasn't something I did :o
EDIT: Never mind, I saw your post in the XGUI thread.. do you remember exactly when it started saying this?
--- End quote ---
After I fixed a hook breaking.
Major_Pain:
Okay! I have started a new script that sets prop limit per user group. All I need to know is how to figure out a person's prop count. I tried doing ply:GetCount( "props" ). I wasn't successful.
JamminR:
Major Pain, see our UNoLimited script in releases.
Though not done by usergroup other than admin and superadmin (yet), it should give you a good basis to look in for at least the counting portions.
Major_Pain:
Jay informed me that GetCount("props") is correct, so my script must be wrong somewhere. I am going to post it here:
--- Code: ---local totalProps = {}
local function PropLimit( ply )
totalProps[ply] = ply:GetCount("props")
if ply:IsUserGroup("minge") then
return false
end
if ply:IsUserGroup("user") then
if totalProps[ply]>30 then
return false
end
end
if ply:IsUserGroup("starter") then
if totalProps[ply]>50 then
return false
end
end
if ply:IsUserGroup("regular") then
if totalProps[ply]>70 then
return false
end
end
if ply:IsUserGroup("members") then
if totalProps[ply]>100 then
return false
end
end
if ply:IsUserGroup("gettingthere") then
if totalProps[ply]>125 then
return false
end
end
if ply:IsUserGroup("there") then
if totalProps[ply]>150 then
return false
end
end
if ply:IsUserGroup("cavedweller") then
if totalProps[ply]>175 then
return false
end
end
if ply:IsUserGroup("nolife") then
if totalProps[ply]>200 then
return false
end
end
if ply:IsUserGroup("moderator") then
if totalProps[ply]>300 then
return false
end
end
end
hook.Add( "PlayerSpawnProp", "blockProps", PropLimit)
local function CantOpen ( ply )
if ply:IsUserGroup("minge") then
ply:PrintMessage( HUD_PRINTTALK, "Silly minge! Props are for players!" )
return false
end
end
hook.Add( "OnSpawnMenuOpen", "OpenMenu", CantOpen)
--- End code ---
I'll go take a look at the UNoLimited.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version