| |
|
»
»
|
|
| |
Re: yo, wut iz the problem
|
|
|
noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
|
| 18 Jan 2013 11:41 PM |
if string.sub(msg, 1,4) == "kcr " then for i,player in pairs (game.Players:GetChildren()) do if string.find(string.lower(player.Name),string.lower(string.sub(msg,5))) == 1 then for i,table in pairs (killchat) do if table == player.Name then msg = Instance.new("Hint", user.PlayerGui) msg.Text = ""..player.Name.. " has been removed." table.remove(killchat, player.Name) wait(3) msg:Destroy() else print("player not found") end end end end end |
|
|
| Report Abuse |
|
|
noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
|
| 18 Jan 2013 11:42 PM |
| And there's not output. The msg pops up but the player's name is still in the table. |
|
|
| Report Abuse |
|
|
noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
| |
|
UnAdmin
|
  |
| Joined: 10 Jul 2012 |
| Total Posts: 4706 |
|
|
| 18 Jan 2013 11:43 PM |
"yo" problem "is" you didn't post output. Also your table.remove is wrong. Didn't I tell you about the Table Manipulation?
~ᴬᴵᴺ'ᵀ ᵀᴴᴬᵀ ᴬ ᴷᴵᶜᴷ ᴵᴺ ᵀᴴᴱ ᴴᴱᴬᴰˑ~ |
|
|
| Report Abuse |
|
|
noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
|
| 18 Jan 2013 11:45 PM |
| Please get some eyeglasses. |
|
|
| Report Abuse |
|
|
UnAdmin
|
  |
| Joined: 10 Jul 2012 |
| Total Posts: 4706 |
|
|
| 18 Jan 2013 11:46 PM |
I posted late. Don't need to be rude.
~ᴬᴵᴺ'ᵀ ᵀᴴᴬᵀ ᴬ ᴷᴵᶜᴷ ᴵᴺ ᵀᴴᴱ ᴴᴱᴬᴰˑ~ |
|
|
| Report Abuse |
|
|
noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
| |
|
UnAdmin
|
  |
| Joined: 10 Jul 2012 |
| Total Posts: 4706 |
|
|
| 18 Jan 2013 11:49 PM |
What do you mean? I gave you your answer. Saying "yo wut iz the problem" makes you sound like a complete moron. That's why nobody will answer.
~ᴬᴵᴺ'ᵀ ᵀᴴᴬᵀ ᴬ ᴷᴵᶜᴷ ᴵᴺ ᵀᴴᴱ ᴴᴱᴬᴰˑ~ |
|
|
| Report Abuse |
|
|
mew903
|
  |
| Joined: 03 Aug 2008 |
| Total Posts: 22071 |
|
|
| 18 Jan 2013 11:51 PM |
if string.sub(msg, 1,4) == "kcr " then for i,player in pairs (game.Players:GetChildren()) do if string.find(string.lower(player.Name),string.lower(string.sub(msg,5))) == 1 then for i,table in pairs (killchat) do if table == player.Name then msg = Instance.new("Hint", user.PlayerGui) msg.Text = ""..player.Name.. " has been removed." table.remove(killchat, (function() for i, v in ipairs(killchat) do if v == player.Name then return i; end end end)()); wait(3) msg:Destroy() else print("player not found") end end end end end
Should work. |
|
|
| Report Abuse |
|
|
|
| 18 Jan 2013 11:51 PM |
I told you how to apply it to strings:
for i, v in pairs( killchat ) do if v:lower( ) == player.Name:lower( ) then table.remove( killchat, i ) end end
¤ ¤ † K M <( •д• )> X D † ¤ ¤
|
|
|
| Report Abuse |
|
|
noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
|
| 18 Jan 2013 11:54 PM |
@Unadmin Moron? Clearly you can't understand the word 'trolling'. Stop acting like a know it all and start belittling others just because you can't understand the simplicity of the 'art of trolling'. Yeah and calling other people on online forums morons makes you feel better then joo hav teh probz.
@Mew; Thanks, yo. I'll try that out. |
|
|
| Report Abuse |
|
|
noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
|
| 18 Jan 2013 11:59 PM |
@Mew & knight Hmm, still the same outcome, but I appreciate yo help. |
|
|
| Report Abuse |
|
|
UnAdmin
|
  |
| Joined: 10 Jul 2012 |
| Total Posts: 4706 |
|
|
| 19 Jan 2013 12:00 AM |
SH is no place for trolling. This isn't Off Topic or Roblox Talk. Stop acting like you're troll god.
~ᴬᴵᴺ'ᵀ ᵀᴴᴬᵀ ᴬ ᴷᴵᶜᴷ ᴵᴺ ᵀᴴᴱ ᴴᴱᴬᴰˑ~ |
|
|
| Report Abuse |
|
|
noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
|
| 19 Jan 2013 12:06 AM |
>SH is no place for trolling. This isn't Off Topic or Roblox Talk. Stop acting like you're troll god.
Are you new? -_- Crazyman,MNN, AgentFireFoxand some other well-known scripters always troll here. And how am I acting like a troll god, lol? *sigh* just stop making up excuses and posting on this thread if you're going to continue to flame me. I just want to fix mah code. |
|
|
| Report Abuse |
|
|
2unknown2
|
  |
| Joined: 30 Oct 2011 |
| Total Posts: 9351 |
|
|
| 19 Jan 2013 12:11 AM |
@noah i fixed the script
if string.sub(msg, 1,4) == "kcr " then for i,player in pairs (game.Players:GetChildren()) do if string.find(string.upper(kcr.Name),string.lower(string.sub(msg,5))) == 1 then do for i,table in pairs (killchat) do if table == player.Name then msg = Instance.new("Hint", user.PlayerGui) msg.Text = ""..player.Name.. " has been removed." table.remove(killchat, player.Name) wait(3) msg:Destroy() else print("player not found") end end end end end
|
|
|
| Report Abuse |
|
|
|
| 19 Jan 2013 12:11 AM |
Yo, mine no work 2. u find problem
#Texture.glsl
extern Image img; extern vec3 n; extern vec3 p0; extern vec3 pp1; extern vec3 pp2; extern vec2 rep; extern vec4 q; extern vec3 p; extern vec2 vs; extern number fov; vec3 qmul(vec4 q,vec3 v)//Quaternion rotated vector (q*v) { return v+cross(2*q.xyz,cross(q.xyz,v)+q.w*v); } vec4 mask(vec4 base,vec4 over) { return vec4(over.rgb*over.a+base.rgb*(1-over.a),over.a+base.a*(1-over.a)); } float plane(vec3 norm,vec3 rel,vec3 dir) { return dot(rel,norm)/dot(dir,norm); } vec2 uv=vec2(1,1); vec2 uv2=uv/2; vec4 effect(vec4 colour,Image i_,vec2 _,vec2 s) { //Pixel direction vec3 d=qmul(q,normalize(vec3(2*fov*(s-vs/2)/vs.y,-1))); //Point hit vec3 h=p-d*plane(n,p-p0,d); //Be efficient vec3 diff=h-p0; //Convert to 2d coordinates on image, and mask the colour with the texture's colour (Transparent textures will reveal the colour below) return mask(colour,Texel(img,mod(vec2(dot(pp1,diff),dot(pp2,diff))/rep+uv2,uv))); }
#TextureSurface.lua
--By xXxMoNkEyMaNxXx local unpack=unpack local abs=math.abs local sqrt=math.sqrt local sin,cos=math.sin,math.cos local quad=love.graphics.quad local poly=love.graphics.polygon local setEffect=love.graphics.setPixelEffect local glsl=love.graphics.newPixelEffect(love.filesystem.read'Texture.glsl') local gl_send=glsl.send local PRE_COMPUTE={love.graphics.getWidth(),love.graphics.getHeight()} module(...) local data={} local send=function(index,value) data[index]=value gl_send(glsl,index,value) end function QuaternionToMatrix(q) local w,x,y,z=q[4],q[1],q[2],q[3] return {1-2*y^2-2*z^2,2*x*y+2*w*z,2*x*z-2*w*y}, {2*x*y-2*w*z,1-2*x^2-2*z^2,2*y*z+2*w*x}, {2*x*z+2*w*y,2*y*z-2*w*x,1-2*x^2-2*y^2} end --[['prepare' - Prepare an image to be rendered to a surface. 'img'=Image; The image you want to render onto the surface. 'sfc_centre'={x,y,z}; The center point of the surface. 'sfc_norm'={x,y,z}; A unit vector perpendicular to the surface. 'sfc_right_dir'={x,y,z}; A unit vector contained in the surface that will represent the X axis on the image. 'sfc_up_dir'={x,y,z}; A unit vector contained in the surface that will represent the Y axis on the image. 'repeat_'={x,y}; Repeat the texture every {x,y} units. (Set to the size of the surface for one appearance.) --]] function prepare(img,repeat_,sfc_centre,sfc_right_dir,sfc_up_dir,sfc_norm) send("img",img) send("p0",sfc_centre) send("pp1",sfc_right_dir) send("pp2",sfc_up_dir) send("n",sfc_norm) send("rep",{repeat_[1]*2,repeat_[2]*2}) end --[['setCamera' - Sets the camera's position and rotation in one of three ways: 'pos'={x,y,z}; Only change position. nil; nil; 'pos'={x,y,z}; Position of camera. 'quat'={x,y,z,w}; Quaternion. Note that w is after x,y, and z. 'angle'=nil; The quaternion already describes the rotation. or 'pos'={x,y,z}; Position of camera. 'axis'={x,y,z}; Direction the camera points. 'angle'=radians; Rotate the camera on the specified axis. --]] function setCamera(pos,quat,angle) send("p",pos) if quat then if angle then local mul=sin(angle/2) local w,x,y,z=cos(angle/2),quat[1]*mul,quat[2]*mul,quat[3]*mul local mag=sqrt(w^2+x^2+y^2+z^2) local q={x/mag,y/mag,z/mag,w/mag} send("q",q) data.mat={QuaternionToMatrix(q)} else send("q",quat) data.mat={QuaternionToMatrix(quat)} end end end --[['setSizeFOV' - arguments viewsize={love.graphics.getWidth(),love.graphics.getHeight()} fov: The field of view of the Camera. This can be calculated as tan(Y-visibility/2), where Y-visibility is the angle between the direction at the top of the screen, the camera, and the direction at the bottom of the screen. (In radians) --]] function setFOV(fov,viewsize) send("fov",fov) if viewsize then send("vs",viewsize) end end --Use this function like love.graphics.setPixelEffect(enable), but it only enables this effect. local loaded=false function preload(loadup)--True to set, false to unset... if loadup then setEffect(glsl) else setEffect() end loaded=loadup and true or false--Convert to bool (Actually not necessary, but it is most likely easier to compute later if-statements at high speed.) end --(vs.x+relpos.x/relpos.z*vs.y*fov)/2, (vs.y-vs.y*relpos.y/relpos.z*fov)/2 function worldToScreen(mat,pos) --pos-cross(2*q.xyz,q.w*pos-cross(q.xyz,pos)) --local relpos={pos[1]*data.pp1[1]+pos[2]*data.pp2[1]+pos[3]*data.n[1],pos[1]*data.pp1[2]+pos[2]*data.pp2[2]+pos[3]*data.n[2],pos[1]*data.pp1[3]+pos[2]*data.pp2[3]+pos[3]*data.n[3]} local relz=abs(pos[1]*mat[1][3]+pos[2]*mat[2][3]+pos[3]*mat[3][3]) return (data.vs[1] + (pos[1]*mat[1][1]+pos[2]*mat[2][1]+pos[3]*mat[3][1]) * data.vs[2]*data.fov/relz)/2, (data.vs[2] - (pos[1]*mat[1][2]+pos[2]*mat[2][2]+pos[3]*mat[3][2]) * data.vs[2]*data.fov/relz)/2 end --[[ local function qmul(q,v) return end local function plane(norm,rel,dir) return dot(rel,norm)/dot(dir,norm) end function screenToWorld(pos) --qmul(q,v)=v+cross(2*q.xyz,cross(q.xyz,v)+q.w*v) --d=qmul(q,pos) pos+cross(2*data.q[1],2*data.q[2],2*data.q[3],cross(q.xyz,v)+q.w*v) --h=p-d*plane(n,p-p0,d) --diff=h-p0 end local function mul(mat,v) return {v[1]*mat[1][1]+v[2]*mat[2][1]+v[3]*mat[3][1], v[1]*mat[1][2]+v[2]*mat[2][2]+v[3]*mat[3][2], v[1]*mat[1][3]+v[2]*mat[2][3]+v[3]*mat[3][3]} end --]] function vertices(size)--compute vertices if size is {x,y} local v1x,v1y=worldToScreen(data.mat,{data.p[1]-data.p0[1]+size[1]*data.pp1[1]+size[2]*data.pp2[1], data.p[2]-data.p0[2]+size[1]*data.pp1[2]+size[2]*data.pp2[2], data.p[3]-data.p0[3]+size[1]*data.pp1[3]+size[2]*data.pp2[3]}) local v2x,v2y=worldToScreen(data.mat,{data.p[1]-data.p0[1]+size[1]*data.pp1[1]-size[2]*data.pp2[1], data.p[2]-data.p0[2]+size[1]*data.pp1[2]-size[2]*data.pp2[2], data.p[3]-data.p0[3]+size[1]*data.pp1[3]-size[2]*data.pp2[3]}) local v3x,v3y=worldToScreen(data.mat,{data.p[1]-data.p0[1]-size[1]*data.pp1[1]-size[2]*data.pp2[1], data.p[2]-data.p0[2]-size[1]*data.pp1[2]-size[2]*data.pp2[2], data.p[3]-data.p0[3]-size[1]*data.pp1[3]-size[2]*data.pp2[3]}) local v4x,v4y=worldToScreen(data.mat,{data.p[1]-data.p0[1]-size[1]*data.pp1[1]+size[2]*data.pp2[1], data.p[2]-data.p0[2]-size[1]*data.pp1[2]+size[2]*data.pp2[2], data.p[3]-data.p0[3]-size[1]*data.pp1[3]+size[2]*data.pp2[3]}) return v1x,v1y,v2x,v2y,v3x,v3y,v4x,v4y end --[['render' - Use to prepare, set effect, and render all in one go. I should think that most people wouldn't need this, but it could be useful to do just one texture when using other pixel effects or no pixel effects on other things without unloading. Comment it out/remove it if you want. --]] local prepare,vertices=prepare,vertices function render(img,prep,size,once) prepare(img,unpack(prep)) if once then setEffect(glsl) elseif not loaded then setEffect(glsl) end quad("fill",vertices(size)) if once then setEffect() end end ----------------------------------------------------------- --auto setup setFOV(1,PRE_COMPUTE) setCamera({0,0,0},{0,0,0,1})
#main.lua
--Surface Texture Demo --localize local sin,cos=math.sin,math.cos --Load module local texture=require'TextureSurface' --Store camera info local cam_pos,cam_axis={0,0,0},{0,0,1} --Store object info local surf_image=love.graphics.newImage'Breaking Benjamin.png' local surf_pos,surf_quat,surf_size={0,0,0},{0,0,0,1},{7,7} function love.load() love.graphics.setBackgroundColor(192,192,255,255) texture.preload(true)--Sets the pixel effect texture.prepare(surf_image,{7,7},surf_pos, texture.QuaternionToMatrix(surf_quat))--Sends the data to the shader (Image, Repeat, Position, Right, Up, Normal) end local next_randomization=0 function love.draw() if cam_axis[1]*(surf_pos[1]-cam_pos[1])+cam_axis[2]*(surf_pos[2]-cam_pos[2])+cam_axis[3]*(surf_pos[3]-cam_pos[3])>=0 then--if it's infront of the camera (don't worry about this) love.graphics.quad("fill",texture.vertices(surf_size))--10,10,650,10,650,490,10,490)--Compute the current polygon's vertices on the screen by specifying the size. else next_randomization=0 end end function love.update() local t=love.timer.getTime()%(math.pi*2) cam_pos={15*cos(t),0,15*sin(t)} if love.timer.getTime()>next_randomization then cam_axis={2*math.random()-1,2*math.random()-1,2*math.random()-1} texture.setCamera(cam_pos,cam_axis,math.random()*2*math.pi)--Moves the camera (Position [<, Axis, Angle> OR <, Quaternion>]) next_randomization=love.timer.getTime()+2 else texture.setCamera(cam_pos) end end
|
|
|
| Report Abuse |
|
|
UnAdmin
|
  |
| Joined: 10 Jul 2012 |
| Total Posts: 4706 |
|
|
| 19 Jan 2013 12:15 AM |
You seemed to be really cocky when you were talking about the art of trolling. The only reason scripters give troll responses is because OP has A) Asked for a request B)Supplied not output.
Your output should have been Workspace.Script:1: bad argument #1 to 'sub' (string expected, got nil)
~ᴬᴵᴺ'ᵀ ᵀᴴᴬᵀ ᴬ ᴷᴵᶜᴷ ᴵᴺ ᵀᴴᴱ ᴴᴱᴬᴰˑ~ |
|
|
| Report Abuse |
|
|
2unknown2
|
  |
| Joined: 30 Oct 2011 |
| Total Posts: 9351 |
|
|
| 19 Jan 2013 12:16 AM |
i also fixed yours you need another end |
|
|
| Report Abuse |
|
|
UnAdmin
|
  |
| Joined: 10 Jul 2012 |
| Total Posts: 4706 |
|
|
| 19 Jan 2013 12:17 AM |
LOL @xXxMoNkEyMaNxXx It's because that is Love 2D!
~ᴬᴵᴺ'ᵀ ᵀᴴᴬᵀ ᴬ ᴷᴵᶜᴷ ᴵᴺ ᵀᴴᴱ ᴴᴱᴬᴰˑ~ |
|
|
| Report Abuse |
|
|
UnAdmin
|
  |
| Joined: 10 Jul 2012 |
| Total Posts: 4706 |
|
|
| 19 Jan 2013 12:19 AM |
Oh and Noah, you need a onchatted event.
~ᴬᴵᴺ'ᵀ ᵀᴴᴬᵀ ᴬ ᴷᴵᶜᴷ ᴵᴺ ᵀᴴᴱ ᴴᴱᴬᴰˑ~ |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2013 12:19 AM |
| o ya I 4got roblox can't do anything lolo |
|
|
| Report Abuse |
|
|
noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
|
| 19 Jan 2013 12:22 AM |
Zomg, I gave you part of the code. "PART" I already have the function name and connection line you idiot. *sigh*
@monkey ye i fixxd it, u need a 'local end end local' on line 237 |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2013 12:29 AM |
| Nobody is going to help you, You are being rude to people trying to help. |
|
|
| Report Abuse |
|
|
noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
|
| 19 Jan 2013 12:32 AM |
| I swear you flamers are pissing me off. -_- Teh, please go get a life and eyeglasses because you can't read. |
|
|
| Report Abuse |
|
|
|
| 19 Jan 2013 12:38 AM |
| Just saying, No need to 'flame' |
|
|
| Report Abuse |
|
|
|
| |
|
|
| |
|
»
»
|
|
|
|
|