Forum

> > CS2D > Scripts > Lua Scripts/Questions/Help
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Lua Scripts/Questions/Help

6.770 Antworten
Seite
Zum Anfang Vorherige 1 2273 274 275338 339 Nächste Zum Anfang

alt Re: Lua Scripts/Questions/Help

Blacko
User Off Offline

Zitieren
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 !

alt Re: Lua Scripts/Questions/Help

TDShuft
User Off Offline

Zitieren
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

alt Re: Lua Scripts/Questions/Help

TDShuft
User Off Offline

Zitieren
Dark Byte hat geschrieben
@shuft
Try using math.floor with tx,ty,gx,gy.

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

alt Re: Lua Scripts/Questions/Help

DRoNe
User Off Offline

Zitieren
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 ?

alt .YeaH.

FiiD
User Off Offline

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

alt Re: Lua Scripts/Questions/Help

Starkkz
Moderator Off Offline

Zitieren
iDios hat geschrieben
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?.

alt Re: Lua Scripts/Questions/Help

TDShuft
User Off Offline

Zitieren
@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
1× editiert, zuletzt 06.10.10 23:49:44

alt Re: Lua Scripts/Questions/Help

KenVo
User Off Offline

Zitieren
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

alt Re: Lua Scripts/Questions/Help

Starkkz
Moderator Off Offline

Zitieren
TDShuft hat geschrieben
@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.

alt Re: Lua Scripts/Questions/Help

TDShuft
User Off Offline

Zitieren
Starkkz hat geschrieben
TDShuft hat geschrieben
@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 ?

alt join script

Glix
User Off Offline

Zitieren
hei guis can they tell me how make join script

like join y200 x200 (to tiles)

alt Re: Lua Scripts/Questions/Help

Snake_Eater
User Off Offline

Zitieren
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

alt Re: Lua Scripts/Questions/Help

hyh2
COMMUNITY BANNED Off Offline

Zitieren
head600 hat geschrieben
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.
Zum Anfang Vorherige 1 2273 274 275338 339 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht