English Lua Scripts/Questions/Help

6,770 replies
Goto Page
To the start Previous 1 2 ... 257 258 259 ... 338 339 Next To the start
11.09.10 04:14:18 pm
Up
Flacko
User
Offline Off
@Alex
Change this
Code:
1
2
3
4
5
rp_license = Array(32,false)
player_have_pos = Array(32,false)
collect = Array(32,1)
tele_x = Array(32,0)
tele_y = Array(32,0)

To this
Code:
1
2
3
4
5
rp_license = initArray(32,false)
player_have_pos = initArray(32,false)
collect = initArray(32,1)
tele_x = initArray(32,0)
tele_y = initArray(32,0)

@Celil
spawnobject 30 x y rot 0 0 player
Where player must be a value between 1 and 3
11.09.10 04:53:47 pm
Up
t4r
User
Offline Off
Can someone help me with this lua scripts?
I am looking for an script which changes to a specific map
when there are 0 players on Server.
11.09.10 05:43:40 pm
Up
CeLiL_CaN
User
Offline Off
@Flacko Thanks for help ...

I have new question

Can i spawn zombies with 500 hp?
11.09.10 10:03:50 pm
Up
Snake_Eater
User
Offline Off
@ Flacko

thx
[Death Note]
11.09.10 11:24:10 pm
Up
murilog
User
Offline Off
Code:
addhook("leave","RPsave")
function RPsave(id)
if (player(id,"usgn") > 0) then
f = assert(io.open('sys/lua/saved/'..player(id,"usgn")..'.txt','w'))
f:write(rp_cr[id])
f:close()
msg2(id,"©000255000Jogo salvo com sucesso!@C")
else
msg2(id,"©000255000Falha ao salvar o jogo!@C")
end
rp_cr[id] = 0
end

addhook("join","RPload")
function RPload(id)
if (player(id,"usgn") > 0) then
msg2(id,'Seu U.S.G.N. ID é : '..player(id,"usgn")..'@C')
f = io.open('sys/lua/saved/'..player(id,"usgn")..'.txt','r')
if (f ~= nil) then
RPTransition(id,f)
f:close()
else
msg2(id,'Falha ao carregar seu Save!@C')
end
else
msg2(id,'Falha ao carregar seu Save!@C')
end
end

addhook("say","SaySaveLoad")
function SaySaveLoad(id,txt)
if (txt=="!save") then
if (player(id,"usgn") > 0) then
msg2(id,'Salvando U.S.G.N. : '..player(id,"usgn")..'@C')
f = assert(io.open('sys/lua/saved/'..player(id,"usgn")..'.txt','w'))
f:write(rp_cr[id])
f:close()
msg2(id,"©000255000Jogo salvo com sucesso!@C")
else
msg2(id,"©000255000Falha ao salvar o jogo!@C")
end
end
if (txt=="!load") then
if (player(id,"usgn") > 0) then
msg2(id,'Carregando U.S.G.N. : '..player(id,"usgn")..'@C')
f = io.open('sys/lua/saved/'..player(id,"usgn")..'.txt','r')
if (f ~= nil) then
RPTransition(id,f)
f:close()
else
msg2(id,'Falha ao carregar seu Save!@C')
end
else
msg2(id,'Falha ao carregar seu Save!@C')
end
end
end

function RPTransition(id,f:read("*all"))
rp_cr[id] = f
msg2(id,'Save carregado com sucesso!@C')
parse('hudtxt2 '..id..' 3 "©000000255Dinheiro : R$ '..rp_cr[id]..'" 17 430')
end

What's wrong ?

and , can make !givemoney <id> <amount> whit this script
11.09.10 11:28:33 pm
Up
Flacko
User
Offline Off
CeLiL_CaN has written:
Can i spawn zombies with 500 hp?

AFAIK, not with console commands.
12.09.10 12:37:11 am
Up
HaRe
User
Offline Off
CeLiL_CaN has written:
@Flacko Thanks for help ...

I have new question

Can i spawn zombies with 500 hp?


check my lua script , ive made an script for that

http://unrealsoftware.de/files_show.php?file=2099
w0w im so eXotiK
12.09.10 12:56:27 pm
Up
Alex_Aaa789
User
Offline Off
New one but when I press f3 and f4 it won't show menu:

Spoiler >


sorry for asking too much
[ToW Co-Leader]Aaa789 IMG:http://i302.photobucket.com/albums/nn92/aaa789_alexlaw4/Untitled8.gif
Oh it was ended already
12.09.10 01:02:52 pm
Up
Evool
User
Offline Off
Hello.
Please write me script for RP, which movies all players to TT, even if it going to CT. But Admins which have RCONs, may go to CT.

Yes, this script is on the WFW RP.

Sorry for my bad english.
12.09.10 02:07:24 pm
Up
kalis
User
Offline Off
help me script
Don't go in tiles water in RPG
help me!
12.09.10 02:52:20 pm
Up
CeLiL_CaN
User
Offline Off
HaRe has written:
CeLiL_CaN has written:
@Flacko Thanks for help ...

I have new question

Can i spawn zombies with 500 hp?


check my lua script , ive made an script for that

http://unrealsoftware.de/files_show.php?file=2099

HaRe i dont want it..I want NPC ZM with 500 hp.. with: cs2d cmd spawnobject
12.09.10 03:08:22 pm
Up
HaRe
User
Offline Off
CeLiL_CaN has written:
HaRe has written:
CeLiL_CaN has written:
@Flacko Thanks for help ...

I have new question

Can i spawn zombies with 500 hp?


check my lua script , ive made an script for that

http://unrealsoftware.de/files_show.php?file=2099

HaRe i dont want it..I want NPC ZM with 500 hp.. with: cs2d cmd spawnobject


i think it works fine with NPC too?? but you just have to change

Code:
1
if (player(id,"team") == 1) then
w0w im so eXotiK
12.09.10 03:26:23 pm
Up
murilog
User
Offline Off
Code
addhook("leave","RPsave")
function RPsave(id)
if (player(id,"usgn") > 0) then
f = assert(io.open('sys/lua/saved/'..player(id,"usgn")..'.txt','w'))
f:write(rp_cr[id])
f:close()
msg2(id,"©000255000Jogo salvo com sucesso!@C")
else
msg2(id,"©000255000Falha ao salvar o jogo!@C")
end
rp_cr[id] = 0
end

addhook("join","RPload")
function RPload(id)
if (player(id,"usgn") > 0) then
msg2(id,'Seu U.S.G.N. ID é : '..player(id,"usgn")..'@C')
f = io.open('sys/lua/saved/'..player(id,"usgn")..'.txt','r')
if (f ~= nil) then
RPTransition(id,f)
f:close()
else
msg2(id,'Falha ao carregar seu Save!@C')
end
else
msg2(id,'Falha ao carregar seu Save!@C')
end
end

addhook("say","SaySaveLoad")
function SaySaveLoad(id,txt)
if (txt=="!save") then
if (player(id,"usgn") > 0) then
msg2(id,'Salvando U.S.G.N. : '..player(id,"usgn")..'@C')
f = assert(io.open('sys/lua/saved/'..player(id,"usgn")..'.txt','w'))
f:write(rp_cr[id])
f:close()
msg2(id,"©000255000Jogo salvo com sucesso!@C")
else
msg2(id,"©000255000Falha ao salvar o jogo!@C")
end
end
if (txt=="!load") then
if (player(id,"usgn") > 0) then
msg2(id,'Carregando U.S.G.N. : '..player(id,"usgn")..'@C')
f = io.open('sys/lua/saved/'..player(id,"usgn")..'.txt','r')
if (f ~= nil) then
RPTransition(id,f)
f:close()
else
msg2(id,'Falha ao carregar seu Save!@C')
end
else
msg2(id,'Falha ao carregar seu Save!@C')
end
end
end

function RPTransition(id,f:read("*all"))
rp_cr[id] = f
msg2(id,'Save carregado com sucesso!@C')
parse('hudtxt2 '..id..' 3 "©000000255Dinheiro : R$ '..rp_cr[id]..'" 17 430')
end

What's wrong ?

and , can make !givemoney <id> <amount> whit this script
12.09.10 03:45:03 pm
Up
CeLiL_CaN
User
Offline Off
HaRe has written:
i think it works fine with NPC too?? but you just have to change

Code:
1
if (player(id,"team") == 1) then

I want simple code using cs2d cmd spawnobject
Your script too complex..
12.09.10 05:50:10 pm
Up
TDShuft
User
Offline Off
Spoiler >

sum 1 help pl0x
i want a broadcast system using
"owner(id)" and the others please help
edited 1×, last 13.09.10 02:20:34 am
Sorry , I can't be Perfect !
12.09.10 06:33:46 pm
Up
HaRe
User
Offline Off
shuft has written:
Spoiler >

sum 1 help pl0x


post the whole script -.-
w0w im so eXotiK
12.09.10 07:30:52 pm
Up
senar
User
Offline Off
Hi again.
can some one post a script that make you when you kill npc you get 300$ please?
12.09.10 07:34:06 pm
Up
Todesengel
User
Offline Off
Klick on the spoiler.
Aus technischen Gründen steht die Signatur auf der Rückseite dieses Beitrags.
12.09.10 07:37:13 pm
Up
Vectarrio
User
Offline Off
senar has written:
Hi again.
can some one post a script that make you when you kill npc you get 300$ please?

NPC is an object type 30, so...
Code:
1
2
3
4
5
6
addhook("objectkill","npckill")
function npckill(id,playerid)
     if object(id,"type")==30 then --checks if this object is NPC
          parse("setmoney "..playerid.." "..(player(playerid,"money")+300)) --adds $300
     end
end
12.09.10 07:53:56 pm
Up
CJ7
BANNED
Offline Off
@Alex_Aaa789:

Fixed it a little bit, but your menu's in the serveraction hook are still wrong. I don't know what the purpose of this script is, and why everyone wants to have this license stuff..

Spoiler >
http://uprate6.wordpress.com lua: It's not rocketscience.
To the start Previous 1 2 ... 257 258 259 ... 338 339 Next To the start