Forum

> > CS2D > Scripts > Lua Scripts/Questions/Help
Forums overviewCS2D overview Scripts overviewLog in to reply

English Lua Scripts/Questions/Help

6,770 replies
Page
To the start Previous 1 2175 176 177338 339 Next To the start

old Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Quote
Dark Byte has written
Flacko has written
@Noxic:[...] Alt+169 code. [...]

no it is Alt+0169


Ugh...
It's exactly the same...

old Re: Lua Scripts/Questions/Help

archmage
User Off Offline

Quote
Flacko has written
Dark Byte has written
Flacko has written
@Noxic:[...] Alt+169 code. [...]

no it is Alt+0169


Ugh...
It's exactly the same...

no (at least not for me)
Alt+169 == ⌐
Alt+0169 == ©

old My Q

Kostyan1996
User Off Offline

Quote
Hello, modmakers ! I want to ask two or questions on modmaking:
1) I will ask for an example (classes.lua). How do I, that place of spawn depended on what class a player choose?
2) Is it possible to do so (all the same clases.lua), so that some classes were only available for Ts, and others only for CTs?
Thank for reading Kost@n

old Re: Lua Scripts/Questions/Help

DRoNe
User Off Offline

Quote
Kostyan1996 has written
Hello, modmakers ! I want to ask two or questions on modmaking:
1) I will ask for an example (classes.lua). How do I, that place of spawn depended on what class a player choose?
2) Is it possible to do so (all the same clases.lua), so that some classes were only available for Ts, and others only for CTs?
Thank for reading Kost@n


1)
1
parse ("setpos "..id.." "..x.." "..y")

2) Yes, it is possible
example:
1
2
if (team==1) -- for Ts
	if (team==2) -- for Cts

old TO DRONE

Kostyan1996
User Off Offline

Quote
Thank, but one Q.
1
parse ("setpos "..id.." "..x.." "..y")
I dont understand, "x" and "y", that change to "x" and "y", what I need? and with "..", or not?
---------------------
OW! And 1 Q. (last XD)
Can I make the players were able to take up arms or throw them?
edited 1×, last 17.03.10 03:18:05 pm

old Re: Lua Scripts/Questions/Help

TimeQuesT
User Off Offline

Quote
Kostyan1996 has written
Thank, but one Q.
1
parse ("setpos "..id.." "..x.." "..y")
I dont understand, "x" and "y", that change to "x" and "y", what I need? and with "..", or not?
---------------------
OW! And 1 Q. (last XD)
Can I make the players were able to take up arms or throw them?

example:

x= 300
y=300
parse("setpos "..id.." "..x.." "..y)
-- or
parse ("setpos "..id.." 300 300")--the same crap

old Re: Lua Scripts/Questions/Help

DRoNe
User Off Offline

Quote
Khaleed has written
hey can someone get me a script that just my and my friends usng id can enter on terroris or ct
???


1
2
3
4
5
6
7
8
9
10
11
addhook("team","admteam")
function admteam(id,team)
	if (team==1) then
		if (player(id, "usgn") == your_usgn_here) or (player(id, "usgn") == your_freind_usgn_here) then
			parse("maket "..id)
		else
			return 1 
			
		end
	end
end

i make for you : you and your friends can join T, other players can't join T ... only ct

old Re: Lua Scripts/Questions/Help

siuL
User Off Offline

Quote
yes but its alot of friends like 17 .
i need like to make "vip" and "admin" but i already have this script i need this and anothers lol

old Re: Lua Scripts/Questions/Help

siuL
User Off Offline

Quote
no im sayin same thing of before but i need much things to put and will not write that more 15 times o.O
oh i want skins too
i will create ... later lol

old RPG Shop

Kostyan1996
User Off Offline

Quote
And 1 question...
Who know, how to use RPG Shop?
Say me plz, or give manual...
Ang if you have, give me RPG Shop (Script) plz...
Thank
edited 1×, last 17.03.10 05:43:13 pm

old RPG SHOP

Kostyan1996
User Off Offline

Quote
OMG! ITS VERY HARD FOR ME!!!
Give plz rpg shop script and say me how to USE THAT!!!1111ONEONEoneone...
Thank

old Re: Lua Scripts/Questions/Help

siuL
User Off Offline

Quote
can someone help with this script :
if sample==nil then sample={} end
sample.gl={}
sample.gh={}
addhook("always","sample.gl.always")
addhook("say","sample.gh.say")

function sample.gl.always()
parse("sethealth 1 250")
parse("setmaxhealth 1 250")
end

function sample.gh.say(p,txt)
if (txt=="god 0") then freehook("always","sample.gl.always"); end
if (txt=="god 0") then parse("killplayer 1"); end
if (txt=="god 1") then addhook("always","sample.gl.always"); end
if (txt=="god 1") then parse("equip 1 83"); end
end

its right but .. i ned like god just for cts ( all of cts team )

old Re: Lua Scripts/Questions/Help

Cure Pikachu
User Off Offline

Quote
@ Khaleed

All of CTs have god mode? Well try this code then (I did a change, so don't mind OK?) (Fixed up, Thanks Flacko! )

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
28
29
30
31
32
33
34
if khaleed==nil then khaleed={} end 
khaleed.gl={} 
khaleed.gh={} 

addhook("always","khaleed.gl.always") 
addhook("say","khaleed.gh.say") 

--This function will save me some writing 
--to get the team of a player 
function p_team(id) return player(id,"team") end 

function khaleed.gl.always() --Always hook has no parameters 
	--Loop thru all the players in server 
	for indx,id in ipairs(player(0,"table")) do 
		if p_team(id)==2 then 
			parse("sethealth "..id.." "..250); 
			parse("setmaxhealth "..id.." "..250); 
		end 
	end 
end 

function khaleed.gh.say(id,txt) 
     --Turn to lowercase so the cmd is case-unsensitive 
	txt = txt:lower() 
	if p_team(id)==2 then 
		if txt=="god 0" then 
			freehook("always","khaleed.gl.always"); 
			parse("killplayer "..id); 
		elseif txt=="god 1" then 
			addhook("always","khaleed.gl.always"); 
			parse("equip "..id.." "..83); 
		end 
	end 
end
edited 3×, last 14.04.10 02:40:55 pm

old Re: Lua Scripts/Questions/Help

DRoNe
User Off Offline

Quote
1
math.random = (0, trigger("blabla"))

or :

1
math.random = (0, ("trigger blabla"))

What is better and what is wrong, if this two codes are bad write me that good code
edited 2×, last 18.03.10 04:20:41 pm
To the start Previous 1 2175 176 177338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview