Forum

> > CS2D > Scripts > Yuki's Admin Script Fix
Forums overviewCS2D overview Scripts overviewLog in to reply

English Yuki's Admin Script Fix

21 replies
Page
To the start Previous 1 2 Next To the start

old Yuki's Admin Script Fix

Inflexion
User Off Offline

Quote
Hello people, I was recently playing in CS2D, then I got bored and I went to my server. I wanted to try an admin script and I found yuki's one, I tried it but it bugged.
So, after 1 day, I went to ask my friend user EnderCrypt and I sent him the files that I was sure of that was bugged
He fixed it for me, so I want you people to fix the problem too if it occurs.

-----------------------ADDHOOK2 FIX
First download addhook2 by EnderCrypt, then put it in sys/lua and dofile it with yuki's main.lua like that:

1
2
dofile("sys/lua/addhook2.lua")
dofile("sys/lua/main.lua")

Make sure that the addhook2 is the first one. as I wrote you in the code spoiler. because addhook2 will be used to fix the yuki.hit hooks, if it worked, you'll see addhook2 and blue things in your console.

--------------------------------FIXING THE RANKS:
EDITED, I was just thinkin to get a new simple fix and here is it, I brought this one for you guys!

Note for Yuki:

Spoiler >


Here's the fix:
ExtremeConquerer has written
If you want to use -1
then go to line 756 in saycmds.lua
it's found in yuki directory
theres a line shows you

Code:
if USGN[tgt] > 0 then

change it to
Code:
if USGN[tgt] > -1 then


It will make the idiot rank work, even if the value is below than 0

You need to use addhook2 too, follow all the steps in the thread expect the settings.lua one,


-------------------------FIXING THE NO DMG BUG:
You must go open now sys/lua/yuki and open hooks.lua, you will have a format like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
addhook("startround", "yuki.startround")
addhook("buy", "yuki.buy")
addhook("join", "yuki.join")
addhook("hit", "yuki.hit")
addhook("leave", "yuki.leave")
addhook("clientdata", "yuki.cld")
addhook("spawn", "yuki.spawn")
addhook("attack", "yuki.attack")
addhook("team", "yuki.team")
addhook("say", "yuki.say")
if show_sv_name then addhook("second", "yuki.sec") end
if allow_kick_vote_mod then addhook("vote", "yuki.vote") end
if check_player_name then addhook("name", "yuki.name") end
addhook("die", "yuki.die")

change it to:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
addhook("startround", "yuki.startround")
addhook("buy", "yuki.buy")
addhook("join", "yuki.join")
addhook("hit", "yuki.hit")
addhook("leave", "yuki.leave")
addhook("clientdata", "yuki.cld")
addhook("spawn", "yuki.spawn")
--addhook("attack", "yuki.attack")
addhook("team", "yuki.team")
addhook("say", "yuki.say")
if show_sv_name then addhook("second", "yuki.sec") end
if allow_kick_vote_mod then addhook("vote", "yuki.vote") end
if check_player_name then addhook("name", "yuki.name") end
addhook("die", "yuki.die")


Thanks, that all the bugs that I have experienced with my friend EnderCrypt!


Sorry for the bad english launguage.
edited 2×, last 21.09.15 12:45:34 pm

old Re: Yuki's Admin Script Fix

Talented Doge
User Off Offline

Quote
I've fixed the minor bugs and it's unnecessary to post it here as nobody uses my script obviously.

I've already told you -1 works just fine. At least for me.

old Re: Yuki's Admin Script Fix

_Yank
User Off Offline

Quote
@user Inflexion: The problem isn't his script but the other scripts you're using (they conflict with his script and then everything goes drunk).
Resuming, the solution that EnderCrypt provided you only applies to you (and similar cases) and it isn't specific for this script, so it is useless to share it here.

old Re: Yuki's Admin Script Fix

Inflexion
User Off Offline

Quote
user _Yank nah, I didn't use any other script with it.. plus
The console shows that there's some errors even if I wasn't using any other lua with this yuki script.
by the way I didn't upload this file for people who doesnt experience the bug.. If you had a bug in this script, follow this thread.
------------------------------------------------------------
∗ EDIT:

"
THIS PART IS REMOVED BECAUSE IT'S WAS PASTED IN THREAD.
"

old Re: Yuki's Admin Script Fix

Talented Doge
User Off Offline

Quote
Quote
If you want to use -1
then go to line 756 in saycmds.lua
it's found in yuki directory
theres a line shows you

Code:
1
if USGN[tgt] > 0 then

change it to
Code:
1
if USGN[tgt] > -1 then


It will make the idiot rank work, even if the value is below than 0

You need to use addhook2 too, follow all the steps in the thread expect the settings.lua one,


You do know what does the variable USGN stand for right? USGN stand for the USGN player has, and therefore USGN has to be more than 0, always. I already told you that I tested it and it worked just fine with a ranking of -1. Why don't you trust me, or at least other people if they could test?

old Re: Yuki's Admin Script Fix

Inflexion
User Off Offline

Quote
Now, Yuki, I don't care. I took my time to write all this.
And I don't care about your comments. People that have problems they have the fix here. who don't have problems they don't need to read this.

old Re: Yuki's Admin Script Fix

Talented Doge
User Off Offline

Quote
Why would you ever post solutions that doesn't "solve" the problem and you say you don't care?

You told me you have problem with using -1 as the rank, I don't see that it will bring any as I transform the ranks to number and lua recognize -1 as number as well. Then you posted a "fix" which changes USGN > 0 to USGN > -1 and you say it fixes "rank problem"?

I'm the author of this shit and you don't care about my comments ignoring the fact that I should be the one who knows the shit best?

old Re: Yuki's Admin Script Fix

Yates
Reviewer Off Offline

Quote
I tested it like 2 days ago and -1 worked. What operating system are you using user Inflexion?

I'm curious to see what bring this error up for you, also, would you mind posting error logs? Thanks.

old Re: Yuki's Admin Script Fix

Inflexion
User Off Offline

Quote
@user Yates: OS: Windows 7

I have already deleted everything from my desktop because I needed a clean, now I really don't care. if you have a bug fix it from here.

old Re: Yuki's Admin Script Fix

Yates
Reviewer Off Offline

Quote
Hey Thanks didn't notice you were the OP here.

Mind posting error logs so we can fix this for everyone? Thanks Thanks.

old Re: Yuki's Admin Script Fix

Talented Doge
User Off Offline

Quote
I'm serious on fixing minor shits on my script, I'm not the perfect one, but I'm eager to fix it as soon as I figured it out.

Let's look deeper into the newest article:

• Addhook2
Well, I have no clue about what addhook2 is. At least not me. I have never put addhook2.lua into my folder, nor you have uploaded it anywhere and attached it to your passage. So, where is addhook2.lua?

• Ranks
For a billion times I said -1 works just fine, and you are stubborn like an old woman. I've tried it and even user Yates confirmed it that it works well. You are using the exactly same operating system as we do and you encounter weird problems. Well, tell us which version of CS2D you are using, better to tell us what changes have you been made to my shit.

• NO DMG BUG
I concede that this is my fault that didn't check the files clearly and left this bug behind my v6.7.9 release. I removed adding hook to attack, instead of making that line a comment.

Maybe call upon your friend user EnderCrypt here and let him explain since you don't care what I say?

old Re: Yuki's Admin Script Fix

GeoB99
Moderator Off Offline

Quote
If I want to tell it, I've tested the Yuki Usagi's Admin script just to check the -1 thingy and also other things to be more clear if it works, and I didn't expect any issues so you've got another buddy. I don't really understand how you only get this issue (or maybe there's another person who get same issue?).
To the start Previous 1 2 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview