Forum

> > CS2D > Mods > Lua: "undofile" !?
Forums overviewCS2D overview Mods overviewLog in to reply

English Lua: "undofile" !?

1 reply
To the start Previous 1 Next To the start

old Lua: "undofile" !?

Peacewalker
User Off Offline

Quote
I was writing a script im going to release soon, then i found a problem: It was a class script, but much more complex than the USGN sample that people copy all the time. I downloaded Vectar666 Radar mod and a minimap mod, but only 3 classes would be able to use the radar and see the enemy, the rest would just see the minimap. So I did that:

Spoiler >


Thats the important section of the script. If you select the Scout class he will set the health, armor, speed and give the items; But i also want him to have the radar.

You can see there is no radar dofile in the Rifleman.

It works perfectly, but if you CHANGE the classes AFTER choose Scout (with radar) you will still have the radar, cuz the file has already been triggered by the "dofile".

To solve that I would need a
undofile("sys/lua/war/radar.lua")
and I dont think that exists. Is there any thing I can do to deactivate the radar script when the player chooses ANY non-radar classes?

Any possible solution is welcome.
And, yes, I am a lua noob.
But the final script is really awesome, so i really need help.
Any suggestions?

cookie

old Re: Lua: "undofile" !?

Apache uwu
User Off Offline

Quote
Vectar666's lua will only work for every player, even if you did manage to undofile that would remove the radar for everyone, including the people who should have it.

Take the concept of the radar and apply it to only a single player.
To the start Previous 1 Next To the start
Log in to reply Mods overviewCS2D overviewForums overview