#1

Hey , i have a small problem with my commands in my gamemode.
When i type a command it says Unknown command but the command it works.
This is how my OnPlayerCommandPerformed callback look like
Код:
public OnPlayerCommandPerformed( playerid, cmdtext[ ], success )
{
   if( success == 0 ) return SendClientMessage( playerid, 0xAAAAAA, "Unknown Command. Use /cmds" );
   return 1;
}
Reply
#2

pawn Код:
if(!success)
?
Reply
#3

Return 1 in your commands that exist.

Your code there is fine, success returns 0 if the command doesn't exist or the command didn't return anything.
Reply
#4

Calgone , thanks you're right it works now , i forget to return 1 at some commands .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)