Forum

> > CS2D > Scripts > Lua Scripts/Questions/Help
Forums overviewCS2D overview Scripts overviewLog in to reply

English Lua Scripts/Questions/Help

6,770 replies
Page
To the start Previous 1 2273 274 275338 339 Next To the start

old Re: Lua Scripts/Questions/Help

Blacko
User Off Offline

Quote
No coment ... If you was intelligent you would have guessed it's not my script, I take this script here ... So yes, i can't fix THE script !

old Re: Lua Scripts/Questions/Help

TDShuft
User Off Offline

Quote
can some one help please

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
function anglerad(angle)
	if (angle<=90) then
			angle = (angle + 360)
		end
	return math.rad(math.abs( angle + 90 ))-math.pi
end
addhook("attack2","jump")
function jump(id,mode)
rot = player(id,"rot")
local angle = anglerad(rot)
local newx = player(id,"x") + math.cos(angle)* 63
local newy = player(id,"y") + math.sin(angle)* 63
local olgx = player(id,"x") + math.cos(angle)* 26
local olgy = player(id,"y") + math.sin(angle)* 26
local tx = olgx/32
local ty = olgy/32
local gx = newx/32
local gy = newy/32
	if player(id,"weapontype")==78 or player(id,"weapontype")==50 then
		if tile(tx,ty,"obstacle") then
			if tile(gx,gy,"walkable") then
				parse("setpos "..id.." "..newx.." "..newy)
				player_energy[id]=player_energy[id]-3
			else
				msg2(id,"000255000","Nao Tem piso")
			end
		else
			msg2(id,"000255000","nao Tem Obstaculo")
		end
	end
end

old Re: Lua Scripts/Questions/Help

TDShuft
User Off Offline

Quote
Dark Byte has written
@shuft
Try using math.floor with tx,ty,gx,gy.

well i dont know much about scripting
could you please give example ?

old Re: Lua Scripts/Questions/Help

DRoNe
User Off Offline

Quote
1
2
3
4
local tx = math.floor(olgx/32)
local ty = math.floor(olgy/32)
local gx = math.floor(newx/32)
local gy = math.floor(newy/32)

maybe this ?

old .YeaH.

FiiD
User Off Offline

Quote
Thank you really much Tajifun!!! It works...its a cool script and now I can make my map...

old Re: Lua Scripts/Questions/Help

Starkkz
Moderator Off Offline

Quote
iDios has written
No coment ... If you was intelligent you would have guessed it's not my script, I take this script here ... So yes, i can't fix THE script !


Ok, then ask to the author for a help.
because supposedly the person who uploaded it, has to help you. I saw 2 times the RP script uploaded, who's the real author then?.

old Re: Lua Scripts/Questions/Help

TDShuft
User Off Offline

Quote
@starkkz .. i dont know but seems you to be the rp script author o.O ,

can some one help with this :

1
rp_creds[id]=rp_creds[id]+player(id,[[money]])
Attempt to peform an Arithmetic on field '?' ( nil value )

//edit:
forget it my friend did got it already
edited 1×, last 06.10.10 11:49:44 pm

old Re: Lua Scripts/Questions/Help

KenVo
User Off Offline

Quote
what i need to add to make the stun - explosion lua script?
like when it hit someone then that person speed will be -100 in 3 second

1
2
3
4
5
6
addhook("say","saya")
function saya(id,t)
     if t=="!a" then
          parse("explosion "..x.." "..y.." 10 0 "..id)
     return 1
end

old Re: Lua Scripts/Questions/Help

Starkkz
Moderator Off Offline

Quote
TDShuft has written
@starkkz .. i dont know but seems you to be the rp script author o.O ,

can some one help with this :

1
rp_creds[id]=rp_creds[id]+player(id,[[money]])
Attempt to peform an Arithmetic on field '?' ( nil value )

//edit:
forget it my friend did got it already


Because i'm the author, and i didn't wanted to upload my script. the problem is, 2 persons uploaded it, and they said its by them. So if it is by them, you can ask them for help.

old Re: Lua Scripts/Questions/Help

TDShuft
User Off Offline

Quote
Starkkz has written
TDShuft has written
@starkkz .. i dont know but seems you to be the rp script author o.O ,

can some one help with this :

1
rp_creds[id]=rp_creds[id]+player(id,[[money]])
Attempt to peform an Arithmetic on field '?' ( nil value )

//edit:
forget it my friend did got it already


Because i'm the author, and i didn't wanted to upload my script. the problem is, 2 persons uploaded it, and they said its by them. So if it is by them, you can ask them for help.

i dont need help of them and i hate them too
one of he name is "Chunks" Right ?

old join script

Glix
User Off Offline

Quote
hei guis can they tell me how make join script

like join y200 x200 (to tiles)

old Re: Lua Scripts/Questions/Help

Snake_Eater
User Off Offline

Quote
Hi all I need a function which sorts a table alphabetically....

like in ...
1
2
3
4
5
6
7
8
9
10
11
12
13
function pairsByKeys (t, f)
      local a = {}
      for n in pairs(t) do table.insert(a, n) end
      table.sort(a, f)
      local i = 0      -- iterator variable
      local iter = function ()   -- iterator function
        i = i + 1
        if a[i] == nil then return nil
        else return a[i], t[a[i]]
        end
      end
      return iter
    end
(http://www.lua.org/pil/19.3.html)

But this script only works if the table looks like..

1
table = {A = 78476,B = 64,C = 1} --sample

But I want that the function sorts tables like this....
1
table = {"Peter","John","Abba"}

help pls

old Re: Lua Scripts/Questions/Help

hyh2
COMMUNITY BANNED Off Offline

Quote
head600 has written
how to print on screen?

i want show on screen writing?

how to make??


This is how:

Take printer, and put it to your Computer screen.

Thats it! "How to print on screen".

How to make what? Screen?
You need glass, and plastic etc.

Hope i helped.
To the start Previous 1 2273 274 275338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview