English Lua Scripts/Questions/Help

6,770 replies
Goto Page
To the start Previous 1 2 ... 273 274 275 ... 338 339 Next To the start
05.10.10 07:56:51 pm
Up
Starkkz
Moderator
Offline Off
You don't know how to fix YOUR RP script? LOL.
You should start to use Lua.
lol
05.10.10 08:07:14 pm
Up
Tajifun
User
Offline Off
maybe you should show us your RP script.
would be usefull.
Tajifun yay.
05.10.10 08:17:11 pm
Up
Blacko
User
Offline Off
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 !
IMG:http://www.web-modules.net/upload/cache/userbar/123/452.gif
IMG:http://www.web-modules.net/upload/cache/userbar/124/277.gif
05.10.10 08:40:23 pm
Up
Tajifun
User
Offline Off
doesn't help.
-.-
Tajifun yay.
06.10.10 03:46:41 am
Up
TDShuft
User
Offline Off
can some one help please

Code:
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
Sorry , I can't be Perfect !
06.10.10 04:30:21 am
Up
archmage
User
Offline Off
@shuft
Try using math.floor with tx,ty,gx,gy.
We must secure the existence of our people and a future for white children. 14/88
06.10.10 04:53:15 am
Up
TDShuft
User
Offline Off
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 ?
Sorry , I can't be Perfect !
06.10.10 03:35:34 pm
Up
DRoNe
User
Offline Off
Code:
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 ?
IMG:http://img39.imageshack.us/img39/567/drnatimg.png
06.10.10 10:34:40 pm
Up
FiiD
User
Offline Off
Thank you really much Tajifun!!! It works...its a cool script and now I can make my map...
06.10.10 11:02:38 pm
Up
Starkkz
Moderator
Offline Off
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?.
lol
06.10.10 11:32:59 pm
Up
TDShuft
User
Offline Off
@starkkz .. i dont know but seems you to be the rp script author o.O ,

can some one help with this :

Code:
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
Sorry , I can't be Perfect !
06.10.10 11:54:53 pm
Up
Flacko
User
Offline Off
make this
Code:
1
2
3
rp_creds = {}

rp_creds[id] = rp_creds[id]+tonumber(player(id,"money"))
07.10.10 12:13:08 am
Up
KenVo
User
Offline Off
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

Code:
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
07.10.10 12:40:46 am
Up
Starkkz
Moderator
Offline Off
TDShuft has written:
@starkkz .. i dont know but seems you to be the rp script author o.O ,

can some one help with this :

Code:
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.
lol
07.10.10 01:33:35 am
Up
TDShuft
User
Offline Off
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 :

Code:
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 ?
Sorry , I can't be Perfect !
07.10.10 01:22:12 pm
Up
Glix
User
Offline Off
hei guis can they tell me how make join script

like join y200 x200 (to tiles)
Create free website for your clan! Create server control panel webE --->http://www.000webhost.com/581961.html
07.10.10 02:05:29 pm
Up
Snake_Eater
User
Offline Off
Hi all I need a function which sorts a table alphabetically....

like in ...
Code:
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..

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


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


help pls
[Death Note]
07.10.10 06:00:07 pm
Up
head600
BANNED
Offline Off
how to print on screen?

i want show on screen writing?

how to make??
07.10.10 06:05:10 pm
Up
Vectarrio
User
Offline Off
msg("text")
or parse("sv_msg "..text)
and if for player:
msg2(player,"text")
and parse thing
07.10.10 06:07:05 pm
Up
hyh2
COMMUNITY BANNED
Offline Off
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.
IMG:http://www.graphicsgrotto.com/animatedgifs/comments/thankyou/images/agcthankyou4.gif
To the start Previous 1 2 ... 273 274 275 ... 338 339 Next To the start