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 2162 163 164338 339 Next To the start

old Re: Lua Scripts/Questions/Help

Anders4000
User Off Offline

Quote
Kking has written
Something like a USGN member (specific) gets special commands,hp,speed,weps u know


Lol. Aren't we making the same scripts on and on? (:

Here you should be able to learn something about that Here..

old Re: Lua Scripts/Questions/Help

dENd
User Off Offline

Quote
Anders4000 has written
Kking has written
Something like a USGN member (specific) gets special commands,hp,speed,weps u know


Lol. Aren't we making the same scripts on and on? (:

Here you should be able to learn something about that Here..


Wheni opened ur link i got scared all those letters i mean OMG...if u just can find a admin script that can be edited iwould be realy thankfull...

old Re: Lua Scripts/Questions/Help

Flametail
User Off Offline

Quote
redefinder has written
Flametail has written
same idea for a global speedmod or setmaxhealth?

Just change commands.
For speedmod:
1
parse("speedmod "..id.." 10)
For health:
1
parse("setmaxhealth "..id.." 250)


none of these work. at all. it complains that id is nil

same with this or any other related script:

Spoiler >
edited 1×, last 13.02.10 07:28:36 am

old :D

Maniek
User Off Offline

Quote
Ok I finish this script

Quote
addhook("attack","cod4.ammo")
function cod4.ammo(id,weapon)
     if (wpn == 69) then
parse("spawnitem 61 "..player(id,"tilex").." "..player(id,"tiley").."")
     end
     end
edited 4×, last 13.02.10 11:29:06 am

old Re: Lua Scripts/Questions/Help

Vectarrio
User Off Offline

Quote
Try this
1
2
3
4
5
6
7
8
9
10
addhook("attack","cod4.m")
function cod4.m(id,weapon)
if (wpn == 69) then
parse("spawnitem 64 "..player(id,"tilex").." "..player(id,"tiley"))
return 1


end

end

old Re: Lua Scripts/Questions/Help

Redefinder
User Off Offline

Quote
Flametail has written
none of these work. at all. it complains that id is nil

same with this or any other related script:

I said change the command from my previous script.
Like this:
1
2
3
4
addhook("spawn","fastplayers")
function fastplayers(id)
[b]parse("speedmod "..id.." 10")[/b]
end
Now it will work.

old Re: Lua Scripts/Questions/Help

Maniek
User Off Offline

Quote
Sorry but I have new error.

Quote
addhook("attack","cod4.m")
function cod4.m(id,weapon)
if (wpn == 69) then
parse("spawnitem 64 "..player(id,"tilex").." "..player(id,"tiley"))
return 1


end

end


to active this script i must hit someone .
It work when I click LPM with matchet its spawn primaryammo but when i hit someone or something agian the script stop working

this is error from console

Quote
[12:09:08] LUA ERROR: attempt to call a nil value
[12:09:08] Lua: Adding function 'cod4.ammo' to hook 'attack'


what is wrong ??

old Re: Lua Scripts/Questions/Help

Vectarrio
User Off Offline

Quote
Hook "attack" does not have "weapon" parameter.
And there is no return.
1
2
3
4
5
6
addhook("attack","cod4.m")
function cod4.m(id)
	if (player(id,"weapontype") == 69) then
		parse("spawnitem 64 "..player(id,"tilex").." "..player(id,"tiley"))
	end
end

old Re: Lua Scripts/Questions/Help

DRoNe
User Off Offline

Quote
1
2
3
function MY_HUD
parse("hudtxt '..id..' ©255220000Text: '..value..' text ' 256 416")
end

what's wrong?? help

old Re: Lua Scripts/Questions/Help

Vectarrio
User Off Offline

Quote
DRoNe has written
1
2
3
function MY_HUD
parse("hudtxt '..id..' ©255220000Text: '..value..' text ' 256 416")
end

what's wrong?? help

function MY_HUD(id,value)

Now you must call your function:
MY_HUD(id,value)
In call of function change: player id instead of id and some number or string instead of value.

old :\

TicTac
BANNED Off Offline

Quote
how make flare blinds me? and makes msg.?

old Re: Lua Scripts/Questions/Help

Starkkz
Moderator Off Offline

Quote
Vectar666 has written
DRoNe has written
1
2
3
function MY_HUD
parse("hudtxt '..id..' ©255220000Text: '..value..' text ' 256 416")
end

what's wrong?? help

function MY_HUD(id,value)

Now you must call your function:
MY_HUD(id,value)
In call of function change: player id instead of id and some number or string instead of value.


the command is wrong.

1
2
3
function MY_HUD(id,v)
	parse('hudtxt2 '..id..' "©255220000Text: '..v..' text' 256 416')
end

old Re: Lua Scripts/Questions/Help

Starkkz
Moderator Off Offline

Quote
noo sorry, i forgot something, xD.

1
2
3
function MY_HUD(id,v,slot) 
parse([[hudtxt2 ]]..id..[[ ]]..slot..[[ "©255220000Text: ]]..v..[[ text" 256 416]]) 
end
it need a slot, to update the hud.

old Re: Lua Scripts/Questions/Help

Flametail
User Off Offline

Quote
ok, how do I make it so that players can only join one team? Like, players can only join as terrorists (or spectators), and the admins can be Counter-Terrorists only becuase they can use the makect command.
To the start Previous 1 2162 163 164338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview