Problem with sscanf or what?
#1

I got a problem that when i use any command that i must write the full usage of the command
Example
pawn Код:
dcmd_adkill(playerid,params[])
{
    new string[128];
    new ID;
    new cmdreason[100];
    if(sscanf(params,"us[100]",ID,cmdreason))
    {
        SendClientMessage(playerid,COLOR_ERROR,"**USAGE: /adkill (Player Name/ID) (Reason)");
        SendClientMessage(playerid,COLOR_LIME,"It will Kill the player");
        return 1;
    }
    if(!IsPlayerConnected(ID))
    {
        format(string,sizeof(string),"The player ID (%d) is not connected to the server. You cannot kill them.",ID);
        SendClientMessage(playerid,COLOR_ERROR,string);
        return 1;
    }
    if(IsKidnapped[playerid] != 0)
    {
        SendClientMessage(playerid,COLOR_ERROR,"**You are Kidnaped you can't use this command");
        return 1;
    }
    format(string,sizeof(string),"%s has killed %s(%d) for reason: %s.",PlayerName(playerid),PlayerName(ID),ID,cmdreason);
    SendClientMessageToAll(COLOR_ADMIN,string);
   
    format(string,sizeof(string),"[ADMIN-COMMAND] %s(%d) has used /adkill on %s(%d)",PlayerName(playerid),playerid,PlayerName(ID),ID);
    SendClientMessageToAllAdmins(string);
    SetPlayerHealth(ID,0);
    return 1;
}
It tells me **USAGE: /adkill (Player Name/ID) (Reason)
Reply


Messages In This Thread
Problem with sscanf or what? - by Problems - 24.01.2014, 10:20
Re: Problem with sscanf or what? - by Shetch - 24.01.2014, 11:01
Re: Problem with sscanf or what? - by Problems - 24.01.2014, 13:35
Re: Problem with sscanf or what? - by Shetch - 24.01.2014, 13:44
Re: Problem with sscanf or what? - by sDAAw - 24.01.2014, 13:48
Re: Problem with sscanf or what? - by Problems - 24.01.2014, 13:49
Re: Problem with sscanf or what? - by Brandon_More - 24.01.2014, 13:56
Re: Problem with sscanf or what? - by Problems - 24.01.2014, 14:06
Re: Problem with sscanf or what? - by Problems - 24.01.2014, 14:50
Re: Problem with sscanf or what? - by Problems - 25.01.2014, 10:40

Forum Jump:


Users browsing this thread: 1 Guest(s)