Open GoogleCodeExporter opened 8 years ago
Hi. I didn't know about this website. I just found it.
But for this issue I would say do not just comment the line as I guess setting
args[1] to empty for non donators must be done for a reason (I didn't check
further but actually I suppose giving empty to 'EnableHat' just doesn't do
anything, or would only warn the player that he's not allowed). Here I think
the method was given to donators but not to other players so it cannot be
called. I would just add a check like this instead :
local function SH_EquipHat( ply, cmd, args )
if !GAMEMODE.ValidHats[args[1]] then args[1] = "" end
if ply.IsDonator and !ply:IsDonator() and GAMEMODE.DonatorHats[args[1]] then args[1] = "" end
ply:EnableHat( args[1] )
end
concommand.Add( "sh_equiphat", SH_EquipHat )
'ply.IsDonator' will return nil and thus be considered false by the check.
Original comment by greg.bl...@hotmail.com
on 18 Apr 2012 at 12:05
Also I had started this thread on the forums :
http://g4p.org/Forum/showthread.php?tid=51. But it might just remain useless
now. But still it can be good to keep things at multiple places.
Original comment by greg.bl...@hotmail.com
on 18 Apr 2012 at 12:07
Original issue reported on code.google.com by
jinnin1...@gmail.com
on 23 Nov 2011 at 8:36