Admin Hiding detects commands as a unknown CMD - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Admin Hiding detects commands as a unknown CMD (
/showthread.php?tid=280293)
Admin Hiding detects commands as a unknown CMD -
Lorenc_ - 31.08.2011
Hey guys, I made a hide command though after typing up some admin commands seems to me that the commands work though a clientmessage is sent showing: You have entered a invalid command.
Does anyone know the case to this?
pawn Код:
public OnPlayerCommandPerformed( playerid, cmdtext [ ], success )
{
if( success == 0 ) return SendError( playerid, "You have entered a invalid command." );
return ( 1 );
}
Re: Admin Hiding detects commands as a unknown CMD -
Darnell - 31.08.2011
pawn Код:
public OnPlayerCommandPerformed( playerid, cmdtext [ ], success )
{
if(!success) return SendError( playerid, "You have entered a invalid command." );
return ( 1 );
}
Try this ?
Re: Admin Hiding detects commands as a unknown CMD -
Lorenc_ - 31.08.2011
Quote:
Originally Posted by Darnell
pawn Код:
public OnPlayerCommandPerformed( playerid, cmdtext [ ], success ) { if(!success) return SendError( playerid, "You have entered a invalid command." ); return ( 1 ); }
Try this ?
|
' ! ' = false statement
' == 0 ' = false statement
They're the same, I would guess this is some bug i need to fix soon otherwise I need to remove the feature
Re : Admin Hiding detects commands as a unknown CMD -
Naruto_Emilio - 31.08.2011
are you using
in the end of your commands (if in strcmp).
that would cause the problem too.
Re: Admin Hiding detects commands as a unknown CMD -
Darnell - 31.08.2011
PHP код:
forward OnPlayerCommandPerformed(playerid, cmdtext[], success);
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) SendClientMessage(playerid, COLOR, "You have entered a invalid command.");
return 1;
}
Try that, won't think it'll help, check if there's return 0; in the end of OnPlayerCommandText if you use strcmp.