Problem with Admin System and FilterScripts
#1

Hello,

I am Kostas and i want to make a server for the clan I am, because the server which play will be closed.
I have added gamemode and many filterscripts. The problem is that I had "L.A.S LuX Admin System" with the others filterscript (Speedboost, cookie/bank/race system and more...My server worked fine!
I change Admin System and some of my filterscript don't work. To be more specific, when I had the "L.A.S LuX Admin System" all worked fine. I change admin system and 3 filterscripts don't work. (carmenu, cartune, E-Anim). I remove the admin system from "server.cfg" and i run my server and the results are that workd fine. The problem is only when I use SloPro's Admin System those 3 filterscripts don't work.

Anyone knows why this happens? I really want to help me because i like SloPro's Admin System and I want to use it with my gamemode. But I want the <carmenu, cartune, E-Anim> too!

Thanks,
Kostas
Reply
#2

are the 3 filterscripts (which deny to work with yor admin fs), using dialogs for the <carmenu, cartune, E-Anim> ?
if so, may i see the last 3 lines from your OnDialogResponse() of your admin script?
or can it be a conflict with ZCMD / OnPlayerCommandText commands?
Reply
#3

Quote:
Originally Posted by Babul
Посмотреть сообщение
are the 3 filterscripts (which deny to work with yor admin fs), using dialogs for the <carmenu, cartune, E-Anim> ?
if so, may i see the last 3 lines from your OnDialogResponse() of your admin script?
or can it be a conflict with ZCMD / OnPlayerCommandText commands?
Yes, they use dialogos for the /carmenu /cartune and /animations.

Hmm, I may understand the problem. The new Admin System has:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 1;
}
Nothing in it.
Reply
#4

remove the entire callback. it should work then. why?
the problem you got, is:
Код:
(0) GameMode
the gamemode got loaded first. see it as a stack. type a command, it will process form top-to-down. with the gamemode only, there wont be any problems, but when you load more scripts (0=gamemode, 1=carmenu, 2=cartune 3=animations), then any command/callback will get processed in this order:
Код:
(3) animations (first)
(2) cartune (second)
(1) carmenu (third)
(0) GameMode (last - always)
the (number) indicates the order they got loaded btw..
so far, all seem to work together. now, lets add your (4) admin script which contains the troblemaking DialogResponse(). ot causes all others to fail:
Код:
(4) Admin  <<< this has the return 1; in the command/callback (DialogResponse here), so it will return too early.
(3) animations
(2) cartune
(1) carmenu
(0) GameMode
by removing the whole callback, it will not abort processing "down the stack".
i suggest you to remove the return 1; there, just to prove that it will work with the "non returning" dialogresponse

i did that trick with the /cmds aswell: the gamemode prints out like 20 lines, plus each filterscripts' commands aswell. like my Race script, loaded as last, prints its /cmds as FIRST, then the former loaded scripts, at last the gamemode cmds. ONLY the gamemode /cmds contains the return 1; at its end, all others will print out text, pass the processing to the next script, until it reaches the return (1 most prolly) in the gamemode...

or, to be short:
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
}
this looks pretty senseless, BUT it works, and causes no trouble afaik. feel free to add some stuff later there.
Reply
#5

Thanks Babul for helping me, but I don't speak english very well and I am begginer and I can't understand what I should do. Do you wanna give me an example on what i should add/remove on this.
Reply
#6

oh sure. you already found it and gave me the code. remove the return 1; inside the DialogResponse...

no:
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
       return 1;
}
yes:
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
}
have fun ^^
Reply
#7

Thanks Babul again.
It works fine!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)