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 2270 271 272338 339 Nächste Zum Anfang

alt Re: Lua Scripts/Questions/Help

HaRe
User Off Offline

Zitieren
Fehuziom hat geschrieben
I have one question:

How to make image in x position and y position of player (This image cant move(Floor Image))?


1
2
3
4
local x,y = player(id,"x"),player(id,"y")
mode = 0 -- Floor Mode
path = "gfx/..." -- Dont remove the ""
image(path,x,y,mode)

@Time4Parteh

1
2
3
4
5
6
7
8
9
10
11
healing = 5 -- how mutch it should heal

addhook("second","lol") function lol()
	for id = 1,32 do
		if (player(id,"exists")) then
			if (player(id,"health")>0) then
				parse("sethealth "..id.." "..(player(id,"health") + healing))
			end
		end
	end
end

alt Re: Lua Scripts/Questions/Help

senar
User Off Offline

Zitieren
what script check if player hits a player with elite or another weapon?

like this:

CODE HERE---- then
MY SCRIPT HERE----

alt Re: Lua Scripts/Questions/Help

byengul
User Off Offline

Zitieren
byengul hat geschrieben
hi i've loaded this mod to my server and i wanted to restart for activating mode but it does not restarting. i mean how can i apply this mod to my server? sorry for my bad english..

help please...

alt Re: Lua Scripts/Questions/Help

MasterAsp
User Off Offline

Zitieren
@senar, Use the hit hook, a parameter for weapon type is passed, so you can recognize what it is, and then you can do something inside the hook if you so wanted to. E.G
1
2
3
4
5
6
7
8
addhook("hit","mHitTest")
function mHitTest(id,source,weapon,hpdmg,apdmg)
	if (player(source,"health") > 0) then
		if (weapon == 50) then --If player gets hit with knife
			--Do you code here
		end
	end
end

alt Re: Lua Scripts/Questions/Help

TDShuft
User Off Offline

Zitieren
How I Make A Function That Checks The Player Armor Id ( When i mean id i meant like 83 super armor )
1× editiert, zuletzt 02.10.10 22:18:35

alt Re: Lua Scripts/Questions/Help

byengul
User Off Offline

Zitieren
hi i want to make an item like when you use it, it will give you 10 level.i've tried to make like that but not worked:
Spoiler >

alt Re: Lua Scripts/Questions/Help

MasterAsp
User Off Offline

Zitieren
@Byengul
1
2
3
4
5
6
7
8
9
10
11
12
[1351] = {
          name = "leveling scroll +10",
          desc = "gives you 10 level. ",
          r = 255, g = 255, b = 255,
          action = "use",
          fimage = "gfx/weiwen/lvl scroll.png",
          eimage = "gfx/weiwen/lvl scroll.png",
          func = {use,function(id,itemslot,itemid)
						PLAYERS[id].Level = PLAYERS[id].Level + 10
					end},
          levelup = 10,
     }
This might work.

alt Re: Lua Scripts/Questions/Help

byengul
User Off Offline

Zitieren
MasterAsp hat geschrieben
@Byengul
1
2
3
4
5
6
7
8
9
10
11
12
[1351] = {
          name = "leveling scroll +10",
          desc = "gives you 10 level. ",
          r = 255, g = 255, b = 255,
          action = "use",
          fimage = "gfx/weiwen/lvl scroll.png",
          eimage = "gfx/weiwen/lvl scroll.png",
          func = {use,function(id,itemslot,itemid)
						PLAYERS[id].Level = PLAYERS[id].Level + 10
					end},
          levelup = 10,
     }

This might work.


not works

alt Re: Lua Scripts/Questions/Help

RyceR
User Off Offline

Zitieren
so try:
1
2
3
4
5
6
7
8
9
10
11
[1351] = {
name = "leveling scroll +10",
desc = "gives you 10 level. ",
r = 255, g = 255, b = 255,
action = "use",
fimage = "gfx/weiwen/lvl scroll.png",
eimage = "gfx/weiwen/lvl scroll.png",
func = {use,function(id,itemslot,itemid)
                              PLAYERS[id].Level = PLAYERS[id].Level + 10
                         end},
}
or
1
2
3
4
5
6
7
8
9
10
[1351] = {
name = "leveling scroll +10",
desc = "gives you 10 level. ",
r = 255, g = 255, b = 255,
action = "use",
fimage = "gfx/weiwen/lvl scroll.png",
eimage = "gfx/weiwen/lvl scroll.png",
func = {use,function(id,itemslot,itemid)
                              PLAYERS[id].Level = PLAYERS[id].Level + 10
                         end}

alt npc

emrebyrm123
User Off Offline

Zitieren
1000 NPC good money when you come you killed

alt .YeaH.

FiiD
User Off Offline

Zitieren
I got a question...can any help me to make a script...when the walls be shooted and they go on 50 or 20 health they change their picture...I wanna make some broken walls...and when they become 50 or 20 health their picture changes...

alt Re: Lua Scripts/Questions/Help

ethand
User Off Offline

Zitieren
can somebody help me, i am trying to add a skin to select for my in-game menu. For example, if somebody went to the menu and clicked "tank" the skin of the tank would appear over the player and would cost them 500k.

i have an idea about how to make the script but not sure how to build the base of it, any help would be appreciated. thx

alt Help me please!

pivot
User Off Offline

Zitieren
can someone create a script that gives all players 16,000 cash per second?

I tried making one, but it did not work

Thanks

alt Re: Lua Scripts/Questions/Help

Admir
User Off Offline

Zitieren
pivot hat geschrieben
can someone create a script that gives all players 16,000 cash per second?

I tried making one, but it did not work

Thanks


1
2
3
4
5
6
7
8
addhook("second","moneypersec")
function moneypersec()
	for i = 1,32 do
		if player(i,"exists") then
			parse("setmoney "..i.." 16000")
		end
	end
end

should give player 16000 money for each second.
Zum Anfang Vorherige 1 2270 271 272338 339 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht