English Lua Scripts/Questions/Help

6,770 replies
Goto Page
To the start Previous 1 2 ... 308 309 310 ... 338 339 Next To the start
15.11.10 12:44:55 pm
Up
Yasday
User
Offline Off
15.11.10 04:48:11 pm
Up
AbAeterno
User
Offline Off
@batlaizys
Players won't harm other players, but they can't kill NPCs

P.S.:I'm doing a NPCkiller script
15.11.10 04:52:28 pm
Up
Rainoth
Moderator
Offline Off
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
15.11.10 04:58:12 pm
Up
Anders4000
User
Offline Off
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 >
15.11.10 05:03:22 pm
Up
Yasday
User
Offline Off
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
15.11.10 05:34:45 pm
Up
Blargh
User
Offline Off
I need a script that shows a healthbar over each player in deathmatch mode.
15.11.10 05:46:44 pm
Up
maPmaKer
User
Offline Off
Yasday has written:


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?
15.11.10 06:09:52 pm
Up
Anders4000
User
Offline Off
Yasday has written:
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!
edited 1×, last 15.11.10 06:24:51 pm
15.11.10 07:09:20 pm
Up
Yasday
User
Offline Off
@Blargh try this
Spoiler >


@Anders4000
lol sry but i didn't try it
15.11.10 07:21:32 pm
Up
Todesengel
User
Offline Off
Nobody can help me?
Aus technischen Gründen steht die Signatur auf der Rückseite dieses Beitrags.
15.11.10 07:39:52 pm
Up
Yasday
User
Offline Off
did you "explain" usgn? like
Code:
1
local usgn = player(id,"usgn")

?
EDIT: why are you adding private (for the id) things to the public save?
15.11.10 09:12:01 pm
Up
byengul
User
Offline Off
How can i delete or not allow to build supply building for players?
After 2 years i'm back to cs2d. cookie for everyone
15.11.10 09:25:53 pm
Up
Chex
User
Offline Off
Code:
1
parse("mp_building_limit "Supply" 0")

Check if it works .
Glad to help.

Code:
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?
edited 1×, last 15.11.10 09:47:27 pm
Who needs a sig?
15.11.10 09:34:18 pm
Up
byengul
User
Offline Off
can i have full code pls? i'm noob at lua
After 2 years i'm back to cs2d. cookie for everyone
15.11.10 09:39:51 pm
Up
Banaan
User
Offline Off
Arcas has written:
Code:
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:
Code:
1
parse("mp_building_limit \"Supply\" 0")
15.11.10 09:46:03 pm
Up
byengul
User
Offline Off
Banaan has written:
Arcas has written:
Code:
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:
Code:
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?
After 2 years i'm back to cs2d. cookie for everyone
15.11.10 09:49:35 pm
Up
Chex
User
Offline Off
byengul has written:
Banaan has written:
Arcas has written:
Code:
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:
Code:
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.
Who needs a sig?
15.11.10 09:55:36 pm
Up
byengul
User
Offline Off
Code:
1
2
3
4
5
parse("mp_building_limit "Supply" 0")

and

parse("mp_building_limit \"Supply\" 0")


not works
After 2 years i'm back to cs2d. cookie for everyone
15.11.10 10:00:21 pm
Up
Chex
User
Offline Off
Code:
1
dofile"sys/lua/yourfolder/nameoffile.lua"

Did you put this in server.lua?
Then it should work with \"Supply\"

Code:
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?
Who needs a sig?
16.11.10 12:29:46 am
Up
Yasday
User
Offline Off
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?
Code:
1
parse([[mp_building_limit "Supply" 0]]) -- much easier, i think
To the start Previous 1 2 ... 308 309 310 ... 338 339 Next To the start