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 2197 198 199338 339 Nächste Zum Anfang

alt Re: Lua Scripts/Questions/Help

gabpro
User Off Offline

Zitieren
@Soja1997
It's here!

Spoiler >


Command :
!joboffer <Work Number> <Quantity Available>

<Work Number> : 0~7
<Quantity Available> :
0 : No available
1 or more : Quantity Available
inf : Infinite

Enjoy

Spoiler >

alt Re: Lua Scripts/Questions/Help

Soja1997
User Off Offline

Zitieren
O thank you very much. Now I'll be testing
@Edit :
Gapro it does not work. Could you fix it and next time test your scripts
1× editiert, zuletzt 03.05.10 08:09:34

alt Hello?

craza424
User Off Offline

Zitieren
Can anyone make me a admin colour script for more then 1 person, don't matter what colour but blue would be nice. It's for a dedicated server.... BTW I've asked this once and got ignored

alt Re: Lua Scripts/Questions/Help

Redefinder
User Off Offline

Zitieren
@craza424,I remember making that script a while ago...
1
2
3
4
5
6
7
addhook("say","adminsay")
function adminsay(id,txt)
	if player(id,"usgn") == YOUR USGN
	msg("©000000255"..player(id,"name").." (Admin): "..txt)
	return 1
	end
end

alt Re: Lua Scripts/Questions/Help

Patasuss
User Off Offline

Zitieren
He wants that there can be multiple guys which can speak in color.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
admins={}

function inTable(tble,val)
	for i=1,#tble do
		if(tble[i]==val) then
			return true
		end
	end
return false
end


function add_admin(uid)
	if(inTable(admins,uid)==false) then
		table.insert(admins,uid)
	end
        print("Admin added")
end

addhook("say","asay")
function asay(id,txt)
	local usgn=player(id,"usgn")
        if(inTable(admins,usgn)==true) then
               msg("©000000255"..(player(id,"name"))..":"..txt)
               return 1
        end
end
Not tested.
To add a admin,
call add_admin(<USGN-ID>)
Replace <USGN-ID> with the usgn-id of the admin.

alt Re: Lua Scripts/Questions/Help

YellowBanana
BANNED Off Offline

Zitieren
I made a little mod that everyone can talk in different colors

Press f2 to select a color, or type !color xxxxxxxxx, and u will talk in that color.

Spoiler >

alt Re: Lua Scripts/Questions/Help

craza424
User Off Offline

Zitieren
Patasuss hat geschrieben
He wants that there can be multiple guys which can speak in color.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
admins={}

function inTable(tble,val)
	for i=1,#tble do
		if(tble[i]==val) then
			return true
		end
	end
return false
end


function add_admin(uid)
	if(inTable(admins,uid)==false) then
		table.insert(admins,uid)
	end
        print("Admin added")
end

addhook("say","asay")
function asay(id,txt)
	local usgn=player(id,"usgn")
        if(inTable(admins,usgn)==true) then
               msg("©000000255"..(player(id,"name"))..":"..txt)
               return 1
        end
end
Not tested.
To add a admin,
call add_admin(<USGN-ID>)
Replace <USGN-ID> with the usgn-id of the admin.


It doesnt work.........

alt Re: Lua Scripts/Questions/Help

Kostyan1996
User Off Offline

Zitieren
Hello All, I need a mod (1gmod.lua 2gmod.lua 3gmod.lua-http://letitbit.net/download/24533.244e9ee789495277fdbf791e7/new_gmod.zip.html) select "items" (press F2). That is to say that when you press F2 to me shows a list of guns, and when you press F3 and F4-nothing.

alt Re: Lua Scripts/Questions/Help

Amidan
User Off Offline

Zitieren
Can anyone help me with my first script? It's about regaining HE grenades after a period of time. But it doesn't give me them, idk why . I checked console, it didin't find any bugs, everything seemed to work. Spoiler:

Mehr >


Can you tell me why it doesn't work? I'd be thankful.

alt Re: Lua Scripts/Questions/Help

craza424
User Off Offline

Zitieren
Amidan hat geschrieben
Can anyone help me with my first script? It's about regaining HE grenades after a period of time. But it doesn't give me them, idk why . I checked console, it didin't find any bugs, everything seemed to work.


Here. I have a grenade script! (This is no reload too if your good try to get rid of that if u don't want it)

(Sorry it looks wierd I'm not perfect on forums >.>)

EDIT: This is for EVERY grenade not just HE I suppose if you deleted the grenade ID's on that line and just left the HE ID that MIGHT just make it HE, I havn't tryed it but have a go!

Mehr >

alt Re: Lua Scripts/Questions/Help

Patasuss
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
-- No Reload and Unlimited Ammo
--
-- By wUps
--
-- # Creds:
-- 
-- Schinken - For the ground of the first No-reload code.
-- LinuxGuy - For the projecttile code, that got my head to think about grenades.
-- And all that i have forgot.
-- 


wat = "51 52 53 54 72 73 75 76 77 86" -- Grenades

addhook("projectile","noreload1")
function noreload1(p,w)
if (string.find(wat,w)~=nil) then
     parse("equip "..p.." "..w) 
     parse("setweapon "..p.." "..w)
end
end
That's better and works for all on the server

alt Re: Lua Scripts/Questions/Help

craza424
User Off Offline

Zitieren
Patasuss hat geschrieben
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
-- No Reload and Unlimited Ammo
--
-- By wUps
--
-- # Creds:
-- 
-- Schinken - For the ground of the first No-reload code.
-- LinuxGuy - For the projecttile code, that got my head to think about grenades.
-- And all that i have forgot.
-- 


wat = "51 52 53 54 72 73 75 76 77 86" -- Grenades

addhook("projectile","noreload1")
function noreload1(p,w)
if (string.find(wat,w)~=nil) then
     parse("equip "..p.." "..w) 
     parse("setweapon "..p.." "..w)
end
end
That's better and works for all on the server


Lolol we linked the same script!

alt Re: Lua Scripts/Questions/Help

Redefinder
User Off Offline

Zitieren
Hello,I'm having trouble with this code,it's job is to make the member's message in white color.
It does that but it doubles the message.
Example:
Spoiler >

I returned the hook and it isn't working.
1
2
3
4
5
6
7
8
9
10
11
member_usgn = {41794}

addhook("say","membersay")
function membersay(id,txt)
          for index,USGN in ipairs(member_usgn) do
               if player(id,"usgn") == 41794 then
                 msg("©255255255"..player(id,"name").." [Member]: "..txt)
		 return 1
               end
          end
end
Any help?

alt Re: Lua Scripts/Questions/Help

Heartless Soldier
User Off Offline

Zitieren
redefinder hat geschrieben
Hello,I'm having trouble with this code,it's job is to make the member's message in white color.
It does that but it doubles the message.
Example:
Spoiler >

I returned the hook and it isn't working.
1
2
3
4
5
6
7
8
9
10
11
member_usgn = {41794}

addhook("say","membersay")
function membersay(id,txt)
          for index,USGN in ipairs(member_usgn) do
               if player(id,"usgn") == 41794 then
                 msg("©255255255"..player(id,"name").." [Member]: "..txt)
		 return 1
               end
          end
end
Any help?


The part of code that you gave us works perfect, you should give us the complete code.

alt Re: Lua Scripts/Questions/Help

gabpro
User Off Offline

Zitieren
In "say" the return didn't works for me too...

When I "return 1" in the say hook of my scripts,the message appears =x

What's wrong?It's a error?
1× editiert, zuletzt 05.05.10 18:26:03
Zum Anfang Vorherige 1 2197 198 199338 339 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht