[Help]y_inline & y_commands
#1

I have a problem
im trying to use y_inline inside of a YCMD

everything works fine
but it sends "Unknown Command" to the
client chat window.

pawn Код:
YCMD:weapon(playerid, params[], help)
{
#pragma unused params
    if (help){SendClientMessage(playerid, 0xFF0000AA, "Give yourself a weapon.");}
    else
    {
        inline wdResponse(pid, dialogid, response, listitem, string:inputtext[])
        {
            #pragma unused pid, dialogid, inputtext

            if(!response)
            {
                SendClientMessage(playerid, 0xFF0000FF, "You cancelled.");
                return 1;
            }
           
            new msg[22+18+1];
            GivePlayerWeapon(playerid, aWeaponNames[listitem][eWeaponN_ID],9999);
            format(msg,sizeof(msg),"You Recived a weapon: %s",aWeaponNames[listitem][eWeaponN_Name]);
            SendClientMessage(playerid,0xAAAAAAAA,msg);
            return 1;
             
        }
        new i,aSize,strDialog[1024];
        aSize = sizeof(aWeaponNames);
        for (i=0;i<aSize;i++){
            if (i==0) format(strDialog, sizeof (strDialog), "%s", aWeaponNames[i][eWeaponN_Name]);
            else format(strDialog, sizeof (strDialog), "%s\n%s",strDialog, aWeaponNames[i][eWeaponN_Name]);
        }
        Dialog_ShowCallback(playerid, using inline wdResponse,DIALOG_STYLE_LIST,"Select A Weapon",strDialog,"Ok","Cancel");
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)