Forum

> > CS2D > Scripts > LFS2| Multiple const, equip mask & expand money
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch LFS2| Multiple const, equip mask & expand money

5 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt LFS2| Multiple const, equip mask & expand money

Ace Howl
User Off Offline

Zitieren
Hello!
I have a problem and request for my server.
Request 1:
How to ignore unfinished building? What I mean was build another new building while the current building was not finished.

Problems 1:
I used a menu to equip things. The problem is I don't know how to make it instead using equip (the item was night vision and gas mask).

Request 2:
I want to change the money (more than 16000) via hudtxt. If someone could do this, please help me.


Any suggestions/solution will appreciated.
2× editiert, zuletzt 15.11.14 13:12:45

alt Re: LFS2| Multiple const, equip mask & expand money

Rainoth
Moderator Off Offline

Zitieren
1.On build attempt make an object "construction" and use timer to destroy it after 3 seconds (with damageobject probably) then spawn a building that was attempted in that spot.

2. It's impossible unless you use spawnitem command where the player stands. The others could still pick it though.

3. make a variable where you store player's cash and set money of the player to five thousand for example, then use second hook to check if player has above 5000 gold and if he has, set it to 5000 again and add gold equal to "his gold - 5000" to your variable.

alt Thanks, but...

Ace Howl
User Off Offline

Zitieren
For user ShouldBeNew, that was good idea, but I want to build another building even there are unfinished building. For you user Rainoth, I'm sorry that I confuse the 1 and 3. The request 2, I prefer to use the hudtxt like "$: xxxxxx". Sorry for that.

alt Re: LFS2| Multiple const, equip mask & expand money

EngiN33R
Moderator Off Offline

Zitieren
You shouldn't separate the counters for your requests and problems, it gets confusing. Just write 1 2 3, not 1 1 2.

Request 1:
I don't think there are any easy ways to accomplish this. One way that I thought of, and implemented, is to completely simulate the process of construction. Here's the code.
Simulated construction >


Problem 1:
Again, no easy way to do that since equip won't let you equip things like night vision and a gas mask directly. Here's one possible hack involving spawning the item on the floor, but it has its drawbacks - someone might pick up the item in the short time between the teleports, etc.
Gas mask equip hack >


Request 2:
Here we go. I didn't actually bind everything to CS2D functions, you can do that yourself - I provided an API. It even has colour effects for money addition and subtraction. Money is reset when a player rejoins.
Virtual money >


I tested everything and it should work properly, but if you find a bug - let me know.

alt Ok.

Ace Howl
User Off Offline

Zitieren
Sorry for that. I will test that one by one.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht