So I need to check if a player is superadmin for something so to test it out i directly copied this code from the gmod wiki. However whenever i run the console command i get told ply:IsSuperadmin is a nil value by the lua errors in console?
Whats wrong? Is the wiki incorrect or am I doing something stupid here?
Anyway here is the code I copied, I put in in shared.lua in the autorun folder:
function SuperAdminCheck(ply, cmd, args)
if ply:IsSuperadmin() then //Checks if the player is a super admin
ply:ChatPrint("You are a Super Admin on this server!") // prints in the chat that he is an admin
elseif ply:IsAdmin() then // Checks if the player is an admin
ply:ChatPrint("You are an Admin on this server!") // prints in chat that he is an admin
else
ply:ChatPrint("You are a normal Player!") // prints in chat to normal players
end
end
concommand.Add("SACheck", SuperAdminCheck)
Lua is CaSe SeNsItIvE, [i]ply:IsSuperadmin()[/i] should be [i]ply:IsSuperAdmin()[/i]
Ah, someone should correct this on the wiki
Done.
Hi, I am Andres Kramack from [url]http://www.cathybarryadultstore.com/[/url].
It's a 'pleasure' serving the public if you know what I mean and this message is
Here at Cathy Barry Adult Store, we offer a wide variety of dildos that come in all sizes from goblin-sized dicks to black-man draconic dicks. I know at Facepunch everyone loves good old dicks which is why [B]I[/B] personally offer anyone with an association with Facepunch Forums a 50% discount code "DIL4FACEPUNCH". Don't forget, this offer lasts until the next Garry's Mod update which we so much love.
Here are pictures of our products just for you!
[IMG]http://pic.esmatube.com/imgs/a/g/t/x/x/giant_dildo_in_my_ass_part_ii-3_tmb.jpg[/IMG]
[IMG]http://pic.esmatube.com/imgs/a/d/d/h/r/bbw_giant_dildo_squat_25cm_round-3_tmb.jpg[/IMG]
[IMG]http://xxxdessert.com/tube/contents/videos_screenshots/15000/15261/preview.mp4.jpg[/IMG]
[IMG]http://g04.a.alicdn.com/kf/HTB1JlHlIpXXXXaJXVXXq6xXFXXXo/Silicone-Huge-Dildos-Vibrator-for-woman-shake-Horse-Dildos-penis-swith-sucker-african-Dong-dildos.jpg[/IMG]
Sponsored Images:
[IMG]http://45.media.tumblr.com/f81f8d61fa253dc804edb423c8ab149f/tumblr_mfbk96QAug1rvbfkuo1_500.gif[/IMG]
[IMG]http://49.media.tumblr.com/9110819111aa37acf4cd1c9d5341dd97/tumblr_nc4hqkdESo1skwv6ko1_500.gif[/IMG]
[IMG]http://1.bp.blogspot.com/-gueWbSnnsIc/UUtenyLS0oI/AAAAAAAANF4/L4aZnTrMaqs/s1600/dermatologists-hate-her.jpg[/IMG]
[IMG]http://static.fjcdn.com/pictures/Gym+leaders+hate+him_ab471d_5017861.jpg[/IMG]
[IMG]https://static.fjcdn.com/comments/That+one+with+the+lamp+got+me+_e68beb19422eea14289caa5f4d6dffb7.jpg[/IMG]
Got any questions? Visit my Steam Profile!
[url]http://steamcommunity.com/id/Robotboy655[/url]
Sorry, you need to Log In to post a reply to this thread.