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 2257 258 259338 339 Nächste Zum Anfang

alt Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Zitieren
@Alex
Change this
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
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

alt Re: Lua Scripts/Questions/Help

t4r
User Off Offline

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

alt Re: Lua Scripts/Questions/Help

murilog
User Off Offline

Zitieren
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

alt Re: Lua Scripts/Questions/Help

Alex_Aaa789
User Off Offline

Zitieren
New one but when I press f3 and f4 it won't show menu:

Spoiler >


sorry for asking too much

alt Re: Lua Scripts/Questions/Help

Evool
User Off Offline

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

alt Re: Lua Scripts/Questions/Help

HaRe
User Off Offline

Zitieren
CeLiL_CaN hat geschrieben
HaRe hat geschrieben
CeLiL_CaN hat geschrieben
@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

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

alt Re: Lua Scripts/Questions/Help

murilog
User Off Offline

Zitieren
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

alt Re: Lua Scripts/Questions/Help

TDShuft
User Off Offline

Zitieren
Spoiler >

sum 1 help pl0x
i want a broadcast system using
"owner(id)" and the others please help
1× editiert, zuletzt 13.09.10 02:20:34

alt Re: Lua Scripts/Questions/Help

HaRe
User Off Offline

Zitieren
shuft hat geschrieben
Spoiler >

sum 1 help pl0x


post the whole script -.-

alt Re: Lua Scripts/Questions/Help

Vectarrio
User Off Offline

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

alt Re: Lua Scripts/Questions/Help

CJ7
BANNED Off Offline

Zitieren
@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 >
Zum Anfang Vorherige 1 2257 258 259338 339 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht