So, I’m trying to insert a custom function into cakescript to make it so that admins can use /ev to create event text, IE:
[EVENT]:TEXT
However, it is bricking the script. I think I f’ed up the if statement somewhere, but I’m not sure. Can someone look this over, and see where I’ve gone wrong? Thankies.
function Event ( ply, text )
if( ply:IsAdmin( ) or !ply:IsSuperAdmin( ) ) then
for k, v in pairs( player.GetAll( ) ) do
CAKE.SendChat( v, " [EVENT]: " .. text );
else
CAKE.SendChat(ply, "You must be an administrator to create events.");
end
return "";
end