Commands are not received by the server
#1

So here's my problem:
Whenever I hold a local server and join the game, the commands simply don't work. They are just ignored.
The server works fine, it's not an issue with the code or the plugins or anything like that. It even happens on the LVDM gamemode.
I used crashdetect to see if something fishy is registered, but nothing. The same servers work on someone else's PC.
Has anyone experienced this before? I even did a full windows reset, but it didn't solve anything.
Reply
#2

Did you exit OnPlayerCommandText with a 'return 0'?
Reply
#3

Quote:
Originally Posted by HeLiOn_PrImE
Посмотреть сообщение
The server works fine, it's not an issue with the code or the plugins or anything like that. It even happens on the LVDM gamemode.
I used crashdetect to see if something fishy is registered, but nothing. The same servers work on someone else's PC.
The codes are fine. I made no changes to LVDM or any other gamemode provided by the SA-MP team.
Reply
#4

does OnPlayerCommandText get called
Reply
#5

Quote:
Originally Posted by KingHual
Посмотреть сообщение
does OnPlayerCommandText get called
I don't think it's called. As I said, the server doesn't seem to be receiving the commands at all.
It also happens with commands processors.
Reply
#6

Did you tried re downloading samp Server files?
Reply
#7

Assuming you aren't using ZCMD or any other command processor, edit your OnPlayerCommandText callback and add the printf line to it, like below:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    printf("OnPlayerCommandText: %d, %s", playerid, cmdtext);
    return 1;
}
Or try that in a blank script.
Reply
#8

Apparently I was wrong. OnPlayerCommandText is called. There must be something wrong with the test gamemode I'm using.
It compiles correctly, but it doesn't work correctly, which is odd, because in 3 years I haven't done any modifications to it.
Normal commands from separate scripts won't work with it either.

Although this version is ancient, it is indeed a leaked gamemode, so I don't want to make it public.
But if someone would like to take a look at it, I'd really appreciate it.
Reply
#9

Check if there's any filterscript(or include in filterscript) that returns 1 in OnPlayerCommandText. (returning 1 stops the calling of OPCT in subsequent scripts)
Reply
#10

Quote:
Originally Posted by Spmn
Посмотреть сообщение
Check if there's any filterscript(or include in filterscript) that returns 1 in OnPlayerCommandText. (returning 1 stops the calling of OPCT in subsequent scripts)
OPCT does not return 1 anywhere, and I have removed all the unneccessary includes.
I can send you the file to have a look, if you want. It's just an ancient stripped down version of RSS.

Quote:
Originally Posted by KingHual
Посмотреть сообщение
what libraries does the mode use
a_samp, CPLoader and Dudb.
I'm pretty sure none of them is causing the issue.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)