You should start to use Lua.
Forum
Scripts
Lua Scripts/Questions/HelpYou should start to use Lua.
would be usefull.
-.-
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
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
Try using math.floor with tx,ty,gx,gy.
Dark Byte has written
@shuft
Try using math.floor with tx,ty,gx,gy.
Try using math.floor with tx,ty,gx,gy.
well i dont know much about scripting
could you please give example ?
1
2
3
4
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 ?
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?.
can some one help with this :
1
rp_creds[id]=rp_creds[id]+player(id,[[money]])
//edit:
forget it my friend did got it already
edited 1×, last 06.10.10 09:49:44 pm
1
2
3
2
3
rp_creds = {}
rp_creds[id] = rp_creds[id]+tonumber(player(id,"money"))
like when it hit someone then that person speed will be -100 in 3 second
1
2
3
4
5
6
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
TDShuft has written
@starkkz .. i dont know but seems you to be the rp script author o.O ,
can some one help with this :
Attempt to peform an Arithmetic on field '?' ( nil value )
//edit:
forget it my friend did got it already
can some one help with this :
1
rp_creds[id]=rp_creds[id]+player(id,[[money]])
//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.
Starkkz has written
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.
TDShuft has written
@starkkz .. i dont know but seems you to be the rp script author o.O ,
can some one help with this :
Attempt to peform an Arithmetic on field '?' ( nil value )
//edit:
forget it my friend did got it already
can some one help with this :
1
rp_creds[id]=rp_creds[id]+player(id,[[money]])
//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 ?
like join y200 x200 (to tiles)
like in ...
1
2
3
4
5
6
7
8
9
10
11
12
13
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
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
i want show on screen writing?
how to make??
or parse("sv_msg "..text)
and if for player:
msg2(player,"text")
and parse thing
head600 has written
how to print on screen?
i want show on screen writing?
how to make??
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.
Lua Scripts/Questions/Help


Offline