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 2200 201 202338 339 Nächste Zum Anfang

alt Re: Lua Scripts/Questions/Help

Szkieletor
User Off Offline

Zitieren
0ito hat geschrieben
I need help to change the limit of setmaxhealth to make a zombie mod(similar to the blazzingxx zombie plague classes)

There is no way to change setmaxhealth limit. It's 250 and nothing will change it. Blazingxx mod uses another container for health, asking him if you can cut this part of script from his mod will be easiest way.

alt Re: Lua Scripts/Questions/Help

Redefinder
User Off Offline

Zitieren
How to make a script that when typed !moneylist shows the money of all players?

Also does anyone have an idea on how to make: !setspawnpos and then teleport the player with !teleportme.
Any help is appreciated.
Thank you.

alt Re: Lua Scripts/Questions/Help

Heartless Soldier
User Off Offline

Zitieren
redefinder hat geschrieben
How to make a script that when typed !moneylist shows the money of all players?

Also does anyone have an idea on how to make: !setspawnpos and then teleport the player with !teleportme.
Any help is appreciated.
Thank you.


1
2
3
4
5
6
7
8
9
10
11
12
addhook("say","onsay")
function onsay(id,message)
	if message=="!moneylist" then
		for i = 1,32 do
			if player(i,"exists") then
				local iname = player(i,"name")
				local imoney = player(i,"money")
				parse('sv_msg2 '..id..' '..iname..' has: '..imoney)
			end
		end
	end
end

Here you are

Explain a bit "!setspawnpos"

EDIT: If I understand what you are thinking to do, don't you think would be better do this:

1
2
3
4
5
6
7
8
9
10
11
12
addhook("say","onsay")
function onsay(id,message)
	for i = 1,32 do
		if message==("!teleportme "..i) then
			local ix = player(i,"x")
			local iy = player(i,"y")
			parse('setpos '..id..' '..ix..' '..iy)
		end
	end
end

--Command:: !teleportme IDofPlayer
4× editiert, zuletzt 14.05.10 00:03:19

alt Re: Lua Scripts/Questions/Help

goweiwen
User Off Offline

Zitieren
For your teleport thing,

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
local spawnpos = {}

addhook("say","onSay")
function onSay(id,message)
	if message == "!setspawnpos" then
		spawnpos[id] = {player(id, 'x'), player(id, 'y')}
	--[[
	elseif message == "!resetspawn" then
		onLeave(id)
	]]
	elseif message == "!teleportme" then
		if spawnpos[id] then
			parse("setpos " .. id .. " " .. spawnpos[id][1] .. " " .. spawnpos[id][2])
		else
			msg2(id, "You have not set a spawn position, use !setspawnpos to set one.")
		end
	end
end

addhook("leave", "onLeave")
function onLeave(id)
	spawnpos[id] = nil
end

alt Re: Lua Scripts/Questions/Help

Szkieletor
User Off Offline

Zitieren
weiwen hat geschrieben
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
local spawnpos = {}

addhook("say","onSay")
function onSay(id,message)
	if message == "!setspawnpos" then
		spawnpos[id] = {player(id, 'x'), player(id, 'y')}
	--[[
	elseif message == "!resetspawn" then
		onLeave(id)
	]]
	elseif message == "!teleportme" then
		if spawnpos[id] then
			parse("setpos " .. id .. " " .. spawnpos[id][1] .. " " .. spawnpos[id][2])
		else
			msg2(id, "You have not set a spawn position, use !setspawnpos to set one.")
		end
	end
end

addhook("leave", "onLeave")
function onLeave(id)
	spawnpos[id] = nil
end


Is there a way to make this an RCON only console command? Or just make this command available only when certain value is true(ex. Cansetspawn = 1)

alt Re: Lua Scripts/Questions/Help

Redefinder
User Off Offline

Zitieren
N-B-K hat geschrieben
Explain a bit "!setspawnpos"

I mean a player types !setspawnpos and then the script remembers his saved position until he disconnects,then he can use !teleportme and if he has atleast 4000$ money he will be teleported.

Anyways,thanks for the moneylist script

alt Re: Lua Scripts/Questions/Help

Sudden Death
User Off Offline

Zitieren
I don't know how to change here
Spoiler >
Please change this to work
1× editiert, zuletzt 16.05.10 09:32:05

alt Re: Lua Scripts/Questions/Help

Precel97
User Off Offline

Zitieren
Hi, im new scripter
I wanna create worms mode.
Who can help me in this script :

Ufo - If you throw gas granade and if you hurt other player then he change to ufo .

Who can create example menu for me??

Help plz


alt Script

Kostyan1996
User Off Offline

Zitieren
Who knew such a script, where if a player joins a CT, it becomes a T, but if the player entered RCON password, or he ADMIN, it can become CT?

alt Re: Lua Scripts/Questions/Help

Dig-Dog-HotDog
User Off Offline

Zitieren
im making an Rpg script and there are cars and boats in them so I have 2 questions :
1.Could some1 write me a code so that when I write "!leave" the player would get out of the car (the same with boat)
2.could some1 write me a code that a certain vehicle could only be in water

alt How to add more spawn of monster to the map?

KenVo
User Off Offline

Zitieren
I downloaded script CS2DTibia - RPG in: http://www.unrealsoftware.de/forum_posts.php?post=176932&start=0 and don't know how to add more monster to the map

Example:

1
2
3
4
5
{
		name = 'Caterpie', health = 100, image = 'gfx/weiwen/pokemon/10.png', scalex = 1.5, scaley = 1.5, r = 104, g = 152, b = 40, 
		atk = 1.1, def = 1.2, spd = 7, atkspd = 10, x = 0, y = 0, ang = 0, imgang = 0, spawnchance = 100, runat = 20, spawn1 = {62, 70}, spawn2 = {150, 150}, 
		exp = 5, money = 80, loot = {{chance = 8000, id = 1}}, 
	},

I want to add more spawn for this monster and make it spawn faster so what i have to change?

alt Re: Lua Scripts/Questions/Help

DRoNe
User Off Offline

Zitieren
Kostyan1996 hat geschrieben
Who knew such a script, where if a player joins a CT, it becomes a T, but if the player entered RCON password, or he ADMIN, it can become CT?


you mean this ? :
1
2
3
4
5
6
7
8
9
10
11
addhook("team","adminteam")
function adminteam(id)
local usgn = player(id,"usgn")
	if usgn == HERE YOUR,FRIEND USGN then
		if team == 2 then
			parse("makect "..id)
		else
			parse("maket "..id)
		end
	end
end

i don't know with rcon_pw, sorry

alt Re: Lua Scripts/Questions/Help

Soja1997
User Off Offline

Zitieren
i got big problem

Spoiler >
Zum Anfang Vorherige 1 2200 201 202338 339 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht