Thread: Minor problem
View Single Post
Old 17/03/2010, 04:41 PM   #1
Desert
Big Clucker
 
Join Date: Aug 2009
Location: Denmark
Posts: 195
Reputation: 0
Default Minor problem

Hey i made an ooc command which looks like this

pawn Code:
dcmd_ooc(playerid,params[])
{
    new text,name[MAX_PLAYER_NAME],string[128];
    if(sscanf(params,"s",text)) SendClientMessage(playerid,COLOUR_RED,"Usage: /ooc message");
    else
    {
        GetPlayerName(playerid,name,sizeof(name));
        format(string,sizeof(string),"OOC %s: %s",name,text);
        SendClientMessageToAll(COLOUR_WHITE,string);
        }
    return 1;
}

Which works fine exept it sends the text plus an "SERVER: Unknown command" no matter where i put the return 1; Any ideas?
Desert is offline