English Lua Scripts/Questions/Help

6,770 replies
Goto Page
To the start Previous 1 2 ... 211 212 213 ... 338 339 Next To the start
24.06.10 05:13:31 pm
Up
Sudden Death
User
Offline Off
AaAa where is mod for "player kill" - kick (i can't search..)
Sniffin'Man "If it cannot be done with lua, it must be you mama, coz she's too fat"
24.06.10 08:26:13 pm
Up
TimeQuesT
User
Offline Off
huh? which mod?

do you mean something like "!kickplayer xyz" or something like that?
Muh
24.06.10 11:44:10 pm
Up
KINGGOLDrus
User
Offline Off
Why doesn't it work?
Code:
1
parse('flashplayer '..id..' 50')

Please, help me.
25.06.10 12:39:25 am
Up
archmage
User
Offline Off
Is that all your script? If not post it.
The problem is that the variable id is nil.
Code:
1
parse("flashplayer "..id.." 50") -- ERROR- id has not been initialized


Code:
1
2
id = 1 -- id has been initialized
parse("flashplayer "..id.." 50") -- no error
We must secure the existence of our people and a future for white children. 14/88
25.06.10 12:56:34 am
Up
KenVo
User
Offline Off
i'm trying to make a car locking system using weiwen car script but i don't know how to make it sorry, i'm noob at scripting

Here is my script
Spoiler >


Here's the weiwen's script:
Spoiler >
25.06.10 02:56:10 pm
Up
Snake_Eater
User
Offline Off
Hi all! I want if I shoot somebody with deagle that this player teleports AND SPAWN again and again at a special place.For example at x=2160 y=784.
CAN ANYBODY SHOW ME A SCRIPT LIKE THIS??
[Death Note]
25.06.10 03:30:55 pm
Up
RyceR
User
Offline Off
i have 2 questions:
1) Where can i download Fifa2D mod?
2) Where is mod from server "modded"?

say plz
IMG:http://img704.imageshack.us/img704/4043/userbargimp.png
25.06.10 05:51:13 pm
Up
KINGGOLDrus
User
Offline Off
Dark Byte,
Code:
1
2
3
4
5
6
7
8
9
10
11
12
addhook("spawn","spw")
function spw(id)
     if (pl_loaded[id]==0) then
          mes(id,1)
     else
          parse('sv_sound2 '..id..' rpg/sounds/other/respawn.wav')
          parse('setpos '..id..' '..pl_savedx[id]..' '..pl_savedy[id])
          parse('speedmod '..id..' '..rpg_speedmod[pl_sk[id][2]])
          resetallhud(id)
     end
     parse('flashplayer '..id..' 50')
end

flashing doesn't work
25.06.10 06:05:47 pm
Up
DRoNe
User
Offline Off
Code:
1
2
3
4
5
for id = 1, 32 do
     if player(id,"exists") then
          parse("flashplayer "..id.." 50")
     end
end


maybe this
edited 2×, last 25.06.10 08:39:37 pm
IMG:http://img39.imageshack.us/img39/567/drnatimg.png
25.06.10 10:11:38 pm
Up
RyceR
User
Offline Off
How to make walls in a random place at round start?
It dont work:
Code:
1
2
3
4
addhook("startround","wall")
function wall()
     parse("spawnobject "..math.random(3,5).." "..math.random(1,14).." "..math.random(154,164).." 0 1 0 0")
end


P.S: Map tiles: 15x15
P.S: Sorry for my bad english
edited 3×, last 25.06.10 10:22:44 pm
IMG:http://img704.imageshack.us/img704/4043/userbargimp.png
25.06.10 10:16:27 pm
Up
archmage
User
Offline Off
@DRoNe
The quotes won't matter, but you could also use this.
Code:
1
2
3
4
5
for id = 1, 32 do
     if player(id,[[exists]]) then
          parse([[flashplayer ]]..id..[[ 50]])
     end
end

But I do not ever use those as they can be confusing.

@KINGGOLDrus
See if there are any errors in the console.
btw what is mes(id,1)?

Edit
I need your full script otherwise I will keep getting an error. If that is your whole script then I know the problem.
We must secure the existence of our people and a future for white children. 14/88
25.06.10 10:48:06 pm
Up
DRoNe
User
Offline Off
@MSek
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
addhook("startround","wall")
function wall()
local wall1 = math.random(0,10)
local wall2 = math.random(0,10)
local wall3 = math.random(0,10)
x = math.random(1, map("xsize")) -- or if tiles 15x15, x = math.random(1,15)
y = math.random(1, map("ysize")) -- here too
     for id = 1, wall1 do
          parse("spawnobject 3 " "..x.." "..y)
     end
     for id = 1, wall2 do
          parse("spawnobject 4 " "..x.." "..y)
     end
     for id = 1, wall3 do
          parse("spawnobject 5 " "..x.." "..y)
     end 
end


try this, i not tested it. maybe it should work.
IMG:http://img39.imageshack.us/img39/567/drnatimg.png
26.06.10 12:26:47 am
Up
BrunoRZ
User
Offline Off
I need a lua script.
I want a simple lua, just like in editor we have "trigger_start".
Cuz I need this trigger only to my server, and people that try use my map will fail.

kind of trigger start "seckey" <-- thats what I need
(prefer using lua instead of putting it in map)
THX
26.06.10 01:36:00 am
Up
archmage
User
Offline Off
@BrunoRZ
Code:
1
2
3
4
5
addhook("startround", "sr")
trigger = "" -- what to trigger
function sr ()
     parse("trigger " .. trigger)
end

just replace trigger = ""
with
trigger = "<what to trigger>"
We must secure the existence of our people and a future for white children. 14/88
26.06.10 02:20:45 am
Up
YellowBanana
BANNED
Offline Off
vesa-omar has written:
Ok, Im trying to do when you throw an Smoke it freeze's the one's it hit.

But i cant get it to work


Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--Weapons--
addhook("projectile","hnsteam_smokecus")
function hnsteam_smokecus(id,weapon,x,y)
  if (weapon==53) then
               parse('effect "colorsmoke" ' ..x.. ' ' ..y.. ' 140 96 0 0 128')
               parse('effect "colorsmoke" ' ..x.. ' ' ..y.. ' 140 96 0 0 128')
          return 1
     end
end

addhook("hit","hnsteam_smokefreeze")
function hnsteam_freeze(target,weapon)
  if (weapon==53) then
          parse("speedmod "..target.." -100")
          return 1
     end
end


hit function will never be called when u hit with a smoke grenade, that's what projectile hook is for. So check in the projectile hook for every player if he's close to the grenade.
26.06.10 10:18:52 am
Up
Sudden Death
User
Offline Off
@Drone
AaAaA Plisi no more chalenges in lua :S first you can test it okay? :X
Sniffin'Man "If it cannot be done with lua, it must be you mama, coz she's too fat"
26.06.10 11:36:02 am
Up
Snake_Eater
User
Offline Off
Hi all! I want if I shoot somebody with deagle that this player teleports AND SPAWN again and again at a special place.For example at x=2160 y=784.
CAN ANYBODY SHOW ME A SCRIPT LIKE THIS PLS PLS??
I am repeating me but there is no good answer
[Death Note]
26.06.10 06:09:29 pm
Up
DRoNe
User
Offline Off
@Intrusion

care yourself ...
IMG:http://img39.imageshack.us/img39/567/drnatimg.png
26.06.10 08:39:13 pm
Up
archmage
User
Offline Off
I have an error that I don't understand: "chunk has too many syntax levels" what does it mean & how exactly to fix it?
We must secure the existence of our people and a future for white children. 14/88
26.06.10 09:21:52 pm
Up
Flacko
User
Offline Off
Post the script please
To the start Previous 1 2 ... 211 212 213 ... 338 339 Next To the start