General > Developers Corner

ULX ADMIN GROUPS LUA HALP!!!

<< < (2/3) > >>

Megiddo:
http://ulyssesmod.net/docs/files/lua/ULib/shared/sh_ucl-lua.html#Player:CheckGroup

nofear1999:
so

if ply:CheckGroup() == "Respected" then
ply:Give( "physgun" )
ply:Give( "physgun" )
end

Megiddo:

--- Quote from: nofear1999 on September 14, 2009, 01:07:57 PM ---so

if ply:CheckGroup() == "Respected" then
ply:Give( "physgun" )
ply:Give( "physgun" )
end

--- End quote ---

No. Pay attention to the docs. CheckGroup returns a bool and takes a parameter.

nofear1999:
I'm not experianced with Booleans yet,

Could you explain? I don't see any formats on the Documentation.

if ply:CheckGroup() "Respected" == 1 then
ply:Give( "physgun" )
ply:Give( "toolgun" )
end

Megiddo:
This isn't the right place to start learning lua. Look to http://lua.org/pil and the garrysmod wiki until you got off your feet.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version