Hey guys, I went away for a few days and when I came back, Garry had done some updates. I tested my Admin Mod and it wont work. I want to know what he has done and if you can help me change my script so it will work.
[lua]hook.Add(“PlayerSay”, “WAMGod”, function(plyObject, saidText, isPublic)
if plyObject:IsAdmin() then
local arguments = string.Explode(" ", saidText);
if (arguments[1] == "!god" and arguments[2] and arguments[2] != "") then
local findName = string.lower( arguments[2] );
local GodPlayers = {};
for k, v in ipairs( player.GetAll() ) do
if ( string.find(string.lower( v:Name() ), findName) ) then
v:GodEnable( )
GodPlayers[#GodPlayers + 1] = v:Name();
end
end
if (#GodPlayers > 0) then
for k, v in ipairs( player.GetAll() ) do
v:PrintMessage(3, "[WAM] "..plyObject:Name().." has godded "..table.concat(GodPlayers, ", and ")..".");
end
end
return "";
end
end;
end);
[/lua]