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 2308 309 310338 339 Nächste Zum Anfang

alt @PunishedNoob

Rainoth
Moderator Off Offline

Zitieren
Well i think its possible to make hit hooks when a weapon NPC he loses health and that hit hook wouldnt work for players. But anyways idont know how to do THAT <(T~T)> But good luck

alt Re: Lua Scripts/Questions/Help

Anders4000
User Off Offline

Zitieren
I have an error in my Killstreak script right here.
The max number of the killstreak variable is 1.
So when i got 2 kills it shows 1.

Any1 know why?

Code in spoiler:
Spoiler >

alt Re: Lua Scripts/Questions/Help

Yasday
User Off Offline

Zitieren
Spoiler >


think it's cause you didn't make the killstreak for everyone, just 1 for every player .. i mean it's not enought killstreak ..
try it idk if it works

alt Re: Lua Scripts/Questions/Help

maPmaKer
User Off Offline

Zitieren
Yasday hat geschrieben


Yes, I tried to edit it for a town (sorry), but then it allows everybody to use F4 and I can't use it just so cause it won't let players join CT. Can you make it work only for admin w/o counting if he is T or CT?

alt Re: Lua Scripts/Questions/Help

Anders4000
User Off Offline

Zitieren
Yasday hat geschrieben
Spoiler >


think it's cause you didn't make the killstreak for everyone, just 1 for every player .. i mean it's not enought killstreak ..
try it idk if it works


Thanks alot, totally forgot that. It've been a half year since I've made a script :p (Don't go check my profile. I'm probably wrong.) But really. I can't remember much! (:

Thanks again!
- Anders4000

EDIT: You just had a couple of miss spells (: It works!
1× editiert, zuletzt 15.11.10 18:24:51

alt Re: Lua Scripts/Questions/Help

Yasday
User Off Offline

Zitieren
@Blargh try this
Spoiler >


@Anders4000
lol sry but i didn't try it

alt Re: Lua Scripts/Questions/Help

Yasday
User Off Offline

Zitieren
did you "explain" usgn? like
1
local usgn = player(id,"usgn")
?
EDIT: why are you adding private (for the id) things to the public save?

alt Re: Lua Scripts/Questions/Help

Chex
User Off Offline

Zitieren
1
parse("mp_building_limit "Supply" 0")
Check if it works .
Glad to help.

1
2
3
4
5
6
7
8
addhook("hit","no_Pvp")
function no_Pvp(id,source,weapon,hpdmg,apdmg)
	if source==0 then
		return 0
	else then
		return 1
	end
end
Anyway, is my code right?
1× editiert, zuletzt 15.11.10 21:47:27

alt Re: Lua Scripts/Questions/Help

Banaan
User Off Offline

Zitieren
Arcas hat geschrieben
1
parse("mp_building_limit "Supply" 0")
Check if it works .
Glad to help.


That certainly won't work. You need to escape the quotes around Supply:
1
parse("mp_building_limit \"Supply\" 0")

alt Re: Lua Scripts/Questions/Help

byengul
User Off Offline

Zitieren
Banaan hat geschrieben
Arcas hat geschrieben
1
parse("mp_building_limit "Supply" 0")
Check if it works .
Glad to help.


That certainly won't work. You need to escape the quotes around Supply:
1
parse("mp_building_limit \"Supply\" 0")


\"Supply\" or \"Supply"\ ?? and i'll only write parse("mp_building_limit \"Supply\" 0") in a clear folder saved as .lua?

alt Re: Lua Scripts/Questions/Help

Chex
User Off Offline

Zitieren
byengul hat geschrieben
Banaan hat geschrieben
Arcas hat geschrieben
1
parse("mp_building_limit "Supply" 0")
Check if it works .
Glad to help.


That certainly won't work. You need to escape the quotes around Supply:
1
parse("mp_building_limit \"Supply\" 0")


\"Supply\" or \"Supply"\ ?? and i'll only write parse("mp_building_limit \"Supply\" 0") in a clear folder saved as .lua?

I do believe so. It needs no hook or anything, I'm noob at LUA too.
Remember to put your dofile in server.lua though.

alt Re: Lua Scripts/Questions/Help

Chex
User Off Offline

Zitieren
1
dofile"sys/lua/yourfolder/nameoffile.lua"
Did you put this in server.lua?
Then it should work with \"Supply\"

1
2
3
4
5
6
7
8
addhook("hit","no_Pvp")
function no_Pvp(id,source,weapon,hpdmg,apdmg)
	if source==0 then
		return 0
	else then
		return 1
	end
end
And someone say if this is right?

alt Re: Lua Scripts/Questions/Help

Yasday
User Off Offline

Zitieren
idk if your script is right but if you remove the then in else then , your script could work

can't you do it like this?
1
parse([[mp_building_limit "Supply" 0]]) -- much easier, i think
Zum Anfang Vorherige 1 2308 309 310338 339 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht