Answer help me is bugged.
#1

pawn Код:
CMD:answerhelpme(playerid, params[])
{
    new id, sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], string[128];
    if(PlayerInfo[playerid][Helperlevel] < 1) return SendClientMessage(playerid,COLOR_ERROR,"[ERROR]: You are not authorized to use this command ");
    if(sscanf(params,"u", id)) return SendClientMessage(playerid, COLOR_SYNTAX," [SYNTAX]: /answerhelpme [playerid]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_ERROR,"[ERROR]: Player not connected");
    else
    {
        if(PlayerNeedsHelp[id] == 1)
        {
            PlayerNeedsHelp[id] = 0;
            GetPlayerName(playerid,sendername,sizeof(sendername));
            GetPlayerName(id,name,sizeof(name));
            format(string, sizeof(string), "**[INFO]: [ID:%d] %s has accepted your help and now ready to assist you! Please be patience.", playerid, sendername);
            SendClientMessage(id, GREEN, string);
        }
        else return SendClientMessage(playerid, COLOR_ERROR,"[ERROR]: This player did not ask for help! [Wrong ID]");
    }
    return 1;
}
Compiles fine but when someone does /helpme >> It works fine .. but when I'll do /answerhelpme >> Nothing happens!
Anyone ?..

btw, here's the Helpme command :
pawn Код:
CMD:helpme(playerid, params[])
{
    new string[128], sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], id;
    if(isnull(params)) return SendClientMessage(playerid, COLOR_SYNTAX,"[SYNTAX]: /helpme [Description]");
    GetPlayerName(playerid,sendername,sizeof(sendername));
    GetPlayerName(id,name,sizeof(name));
    format(string,sizeof(string),"[INFO]: %s has requested for help: %s", sendername, params);
    HBroadCast(ORANGE,string,1);
    SendClientMessage(playerid, GREEN,"[INFO]: You have requested for help, please wait for a reply");
    PlayerNeedsHelp[id] = 1;
    return 1;
}
Reply
#2

Is PlayerInfo[playerid][Helperlevel] created?
When you type /answerhelpme absolutely nothing happens? What happens if you give a param to it?
Reply
#3

Yes, I did.
Like I did /helpme test ( My ID : 1 )
Then I did /answerhelpme 1 then it comes " That player has not requested for Help! [ WRONG ID] "
Reply
#4

Do your other sscanf commands work?
Reply
#5

pawn Код:
CMD:helpme(playerid, params[])
{
    new string[128], sendername[MAX_PLAYER_NAME];
    if(isnull(params)) return SendClientMessage(playerid, COLOR_SYNTAX,"[SYNTAX]: /helpme [Description]");
    GetPlayerName(playerid,sendername,sizeof(sendername));
    format(string,sizeof(string),"[INFO]: %s has requested for help: %s", sendername, params);
    HBroadCast(ORANGE,string,1);
    SendClientMessage(playerid, GREEN,"[INFO]: You have requested for help, please wait for a reply");
    PlayerNeedsHelp[playerid] = 1;
    return 1;
}
This will fix the problem.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)