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 2195 196 197338 339 Next To the start

old Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Quote
Ok guys, Santa is back.

@Soja1997:
http://www.unrealsoftware.de/forum_posts.php?post=120848&start=3840#post179939

@Holloweye:
You could make your own timer system using a table and the msec100 hook.

@SDKey:
I don't get what you mean with bug, but here I replaced the old parse and placed the variables outside the table:
More >

old Re: Lua Scripts/Questions/Help

gabpro
User Off Offline

Quote
Can somebody help me with 2 thing?

•Make the Gut Bomb heals people

•If variable[id]==X and the player [id] drop anything,the item dont disapears
Example : parse("spawnitem X Y Z")

Could not find it the hook at info.txt

If possible,the player can drop armors,nightvision,etc...(F3 menu?)

old Re: gabpro

SDKey
User Off Offline

Quote
gabpro has written
Can somebody help me with 2 thing?
More >


> @gabpro

√1. Two ways:
More >

√2. Again 2 ways:
More >

√2. Yes
More >
edited 4×, last 29.04.10 05:34:00 am

old Re: Lua Scripts/Questions/Help

Heartless Soldier
User Off Offline

Quote
DRoNe has written
Can somebody put me one example for timer ?
thanks .


Timers don't work. They can call a function from other function, but they can't pass the parameters because of a bug.
The only solution for now is make your own timers xD.

old Re: Lua Scripts/Questions/Help

gabpro
User Off Offline

Quote
@SDKey
Wow!
Thank you
I owe you one.

I'm trying to do the drop,but i use the "iid" and not "type",so that bug all :x

Thank you again,and a small correction at Gut Bomb...
Spoiler >



And sorry for my badly english

old Re: Lua Scripts/Questions/Help

Soja1997
User Off Offline

Quote
as spamming only help me and how not everyone is spamming all have me in the ass

Admin/mod comment

And spamming will eventually lead to a ban... /Lee

old Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Quote
N-B-K has written
Timers don't work. They can call a function from other function, but they can't pass the parameters because of a bug.
The only solution for now is make your own timers xD.

Parameters do work, but the function is called twice or sth like that.

old Re: Lua Scripts/Questions/Help

siuL
User Off Offline

Quote
More >

well i need help with it i need to make it right and on a menu taht just opens for admins (where are localized or in ip or in usgn)
if some1 help me i will really thank for that

old AMX2D FIRST BLOOD and help error.

Rubenoel
User Off Offline

Quote
I only want help in this, i have put the amx2d on my cs2d and only the first blood sound don't work, and the other question is what show a error of help.lua in console

old Re: Lua Scripts/Questions/Help

gabpro
User Off Offline

Quote
••I need help(again )••
My save script didn't work,and I dont understand very much how to save or load files with LUA.

It's ok when I save,the file and value saves.

When I use the variable(created by me) after save,it disappears!
It works fine,but if I load the file...BOOM...error =x

•Console message :
"LUA ERROR:[File Directory Here]:64: attempt to [Action Here,like "concatenate field"] "?" (a userdata value)

•Script here :
Spoiler >

old Re: Lua Scripts/Questions/Help

Lee
Moderator Off Offline

Quote
@gabpro: Userdata are basically Lua objects that wraps around native C structures. The File object is a non-native Lua object and is thus userdata:

1
2
3
f = io.open('sys/lua/saved/'..player(id,"usgn")..'.txt','r')
	if f then
		RPTransition(id,f)
(For both instances of this happening)

1
2
3
4
5
function RPTransition(id,f)
	rp_cr[id] = f
	...
	parse('hudtxt2 ... '..rp_cr[id]..'" .... ')
end

in which case, rp_cr[id] is a File object (classified as userdata)

Change
1
RPTransition(id,f)
to
1
RPTransition(id,f:read("*all"))

Also, look out for mixups between local and global variable.

old Re: Lua Scripts/Questions/Help

gabpro
User Off Offline

Quote
Thanks Lee

The code RPTransition(id,f:read("*all")) worked for me

I try to do something similar,but I fail =x
Spoiler >

Really thank you,dude!

old Re: Lua Scripts/Questions/Help

Admir
User Off Offline

Quote
0ito has written
I need help to change the limit of setmaxhealth


you can't change setmaxhealth limit, the max limit is 250 only.
To the start Previous 1 2195 196 197338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview