Commands Don't Work
#1

When I Put This in Server, than no one commad work anymore



Help Me To Fix It

pawn Код:
#include <a_samp>

public OnPlayerCommandText(playerid,cmdtext[])
{
 //---- all commands
  return SendClientMessage(playerid,-1,"{FF0000}Wrong Command! Use /help for more informations");
}
Reply
#2

Remove that and add
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) SendClientMessage(playerid, COLOR_WHITE, "{FF0000}Wrong Command! Use /help for more informations.");
    return 1;
}
Reply
#3

OnPlayerCommandText should return 1. Send a message and after return 1.
Reply
#4

1 ERROR


pawn Код:
#include <a_samp>

public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) SendClientMessageEx(playerid, COLOR_WHITE, "{FF0000}Wrong Command. Type {00FFFF}/help {FF0000}for available commands.");
    return 1;
}
____|_____
____|_____
____|_____
____|_____
___.\/____
pawn Код:
C:\Program Files\Files2\SA-MP Servers\Cops And Robbers [ORGINAL SERVER]\filterscripts\6.pwn(3) : warning 235: public function lacks forward declaration (symbol "OnPlayerCommandPerformed")
C:\Program Files\Files2\SA-MP Servers\Cops And Robbers [ORGINAL SERVER]\filterscripts\6.pwn(5) : error 017: undefined symbol "SendClientMessageEx"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
Reply
#5

pawn Код:
SendClientMessage
Sorry
Reply
#6

pawn Код:
C:\Program Files\Files2\SA-MP Servers\Cops And Robbers [ORGINAL SERVER]\filterscripts\6.pwn(5) : warning 235: public function lacks forward declaration (symbol "OnPlayerCommandPerformed")
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
Fuck, Again Don't Work

pawn Код:
#include <a_samp>

#define NUB 0xEF5AD9FF

public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) SendClientMessage(playerid, NUB, "{FF0000}Wrong Command. Type {00FFFF}/help {FF0000}for available commands.");
    return 1;
}
Reply
#7

Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(success)
	{
	    printf("[COMMAND] The cmd %s was successfull!",cmdtext);
	}
	else
	{
printf("[COMMAND] The cmd %s was wrong.",cmdtext);
format(str,144,"{FF0000} %s was a Wrong Command. Type {00FFFF}/help {FF0000}for available commands.",cmdtext);
SendClientMessage(playerid,BLUE,str);
}
return 1;
}
Reply
#8

Quote:
Originally Posted by Blackazur
Посмотреть сообщение
Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(success)
{
printf("[COMMAND] The Command %s from %s was wrong!",cmdtext,PlayerName[playerid]);
format(str,144,"{FF0000} %s was a Wrong Command. Type {00FFFF}/help {FF0000}for available commands.",cmdtext);
SendClientMessage(playerid,BLUE,str);
}
return 1;
}
Test Before Post.

4 ERROR
Reply
#9

Try now.
Reply
#10

pawn Код:
C:\Program Files\Files2\SA-MP Servers\Cops And Robbers [ORGINAL SERVER]\filterscripts\6.pwn(5) : warning 235: public function lacks forward declaration (symbol "OnPlayerCommandPerformed")
C:\Program Files\Files2\SA-MP Servers\Cops And Robbers [ORGINAL SERVER]\filterscripts\6.pwn(14) : error 017: undefined symbol "str"
C:\Program Files\Files2\SA-MP Servers\Cops And Robbers [ORGINAL SERVER]\filterscripts\6.pwn(15) : error 017: undefined symbol "str"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.


pawn Код:
#include <a_samp>

#define NUB 0xEF5AD9FF

public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(success)
    {
        printf("[COMMAND] The cmd %s was successfull!",cmdtext);
    }
    else
    {
printf("[COMMAND] The cmd %s was wrong.",cmdtext);
format(str,144,"{FF0000} %s was a Wrong Command. Type {00FFFF}/help {FF0000}for available commands.",cmdtext);
SendClientMessage(playerid,NUB,str);
}
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)