HELP! Commands not working at all -
Cardinaal - 19.06.2010
Hello.
I've got a major problem.
My commands won't work. Here's the example of samp wiki:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/help", true))
{
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: This is the /help command!");
return 1;
/* Returning '1' is used to notify the server that the command
has successfully been processed. If you return true here you won't
get that 'SERVER: Unknown Command.', and any conflicts will be
avoided.
*/
}
return 0;
/* Returning '0' is used to inform the server that the command
has not been successfully processed, and passes it to other scripts.
If there hasn't been a successful process, then you will get that
'SERVER: Unknown Command.' error.
*/
}
Everything I try, I get the message 'SERVER: Unknown Command'.
Tried changing returns to 0, all way around, tried everything.
Just can't make the commands work.
HELP?
Re: HELP! Commands not working at all -
Cardinaal - 19.06.2010
[10:38:21] filterscripts = "" (string)
[10:38:21]
[10:38:21] Server Plugins
[10:38:21] --------------
[10:38:21] Loading plugin: Whirlpool
[10:38:21]
[10:38:21] ==================
[10:38:21]
[10:38:21] Whirlpool loaded
[10:38:21]
[10:38:21] ==================
[10:38:21]
[10:38:21] Loaded.
[10:38:21] Loading plugin: irc
[10:38:21]
*** IRC Plugin v1.3.5 by Incognito loaded ***
[10:38:21] Loaded.
[10:38:21] Loaded 2 plugins.
[10:38:21]
[10:38:21] Ban list
[10:38:21] --------
[10:38:21] Loaded: samp.ban
[10:38:21]
[10:38:21]
[10:38:21] Filter Scripts
[10:38:21] ---------------
[10:38:21] Loaded 0 filter scripts.
[10:38:21]
That's all it says in server log for server startup
Re: HELP! Commands not working at all -
Cardinaal - 19.06.2010
Idk if it is any help but I removed Whirlpool and irc from plugins.
Also I had fixed
Код:
[10:38:21] filterscripts = "" (string)
Doesn't show that anymore, it was because I had some filterscripts commented
Re: HELP! Commands not working at all -
Cardinaal - 19.06.2010
Help please
Re: HELP! Commands not working at all -
Wasim_Cortez - 19.06.2010
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/help", true))
{
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: This is the /help command!");
return 1;
/* Returning '1' is used to notify the server that the command
has successfully been processed. If you return true here you won't
get that 'SERVER: Unknown Command.', and any conflicts will be
avoided.
*/
}
return 0;
/* Returning '0' is used to inform the server that the command
has not been successfully processed, and passes it to other scripts.
If there hasn't been a successful process, then you will get that
'SERVER: Unknown Command.' error.
*/
}
What i done?
I removed the
From:
pawn Код:
if(!strcmp(cmdtext, "/help", true))
Re: HELP! Commands not working at all -
Cardinaal - 19.06.2010
I'm pretty sure that won't fix it, just by looking at it.
I'll try
Re: HELP! Commands not working at all -
Cardinaal - 19.06.2010
I knew it, it didn't work
Re: HELP! Commands not working at all -
Wasim_Cortez - 19.06.2010
Mistake! I Forgot to edit it..
Re: HELP! Commands not working at all -
Wasim_Cortez - 19.06.2010
Quote:
Originally Posted by Wasim_Cortez
Should fix it.. Buh meh have a go at it, If not.. Then ill just use this one:
pawn Код:
if(strcmp(cmdtext, "/help", true) == 0) { SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: This is the /help command!"); return 1; }
|
Edit: Add that under "OnPlayerCommandText" In your Game Mode.
Re: HELP! Commands not working at all -
Cardinaal - 19.06.2010
Never mind. I got it solved. :P
Zcmd has: #define OnPlayerCommandText zcmd_OnPlayerCommandText
Causing the OnPlayerCommandText in the game mode not to work.
I basically changed zcmd's OnPlayerCommandText to: OnCommandText and forwarded it: forward OnCommandText(playerid, cmdtext[]);
Thanks for your effort anyway.