Any Cmd Opens Dialog
#5

pawn Код:
#include <a_samp>


public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/attacho", true))
    {
        ShowPlayerDialog(playerid, vmenu, DIALOG_STYLE_LIST, "Object Attacher By: SnG.Scot_MisCuDi", "Cock \nCock1 \nCock2 \nCock3 \nRemove", "Attach", "Cancel");
        return 1;
    }
    return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == vmenu)
    {
        if(response)
        {
            if(listitem == 0)   // Cock
            {
                SetPlayerAttachedObject(playerid, 0, 16776, 2, 0.000000, 0.000000, 0.000000, 0.000000, 90.000000, 180.000000, 0.050000, 0.050000, 0.050000);
                SetPlayerAttachedObject(playerid, 1, 321, 1, -0.200000, 0.349999, -0.150000, 90.000000, 180.000000, 0.000000, 3.000000, 3.000000, 3.000000);
            }
            if(listitem == 1)   // Cock1
            {
                SetPlayerAttachedObject(playerid, 0, 16776, 2, 0.000000, 0.000000, 0.000000, 0.000000, 90.000000, 180.000000, 0.050000, 0.050000, 0.050000);
                SetPlayerAttachedObject(playerid, 1, 321, 1, -0.200000, 0.349999, -0.150000, 90.000000, 180.000000, 0.000000, 3.000000, 3.000000, 3.000000);
            }
            if(listitem == 2)   // Cock2
            {
                SetPlayerAttachedObject(playerid, 0, 16776, 2, 0.000000, 0.000000, 0.000000, 0.000000, 90.000000, 180.000000, 0.050000, 0.050000, 0.050000);
                SetPlayerAttachedObject(playerid, 1, 321, 1, -0.200000, 0.349999, -0.150000, 90.000000, 180.000000, 0.000000, 3.000000, 3.000000, 3.000000);
            }
            if(listitem == 3)   // Cock3
            {
                SetPlayerAttachedObject(playerid, 0, 16776, 2, 0.000000, 0.000000, 0.000000, 0.000000, 90.000000, 180.000000, 0.050000, 0.050000, 0.050000);
                SetPlayerAttachedObject(playerid, 1, 321, 1, -0.200000, 0.349999, -0.150000, 90.000000, 180.000000, 0.000000, 3.000000, 3.000000, 3.000000);
            }
            if(listitem == 4)   // remove
            {
                RemovePlayerAttachedObject(playerid, 0);
                RemovePlayerAttachedObject(playerid, 1);
            }
        }
    }
    return 1;
}

in OnPlayerCommandText need this at the end:
pawn Код:
return 0;
}
Reply


Messages In This Thread
Any Cmd Opens Dialog - by SnG.Scot_MisCuDI - 30.12.2011, 04:47
Re: Any Cmd Opens Dialog - by §с†¶e®РµРe - 30.12.2011, 04:51
Re: Any Cmd Opens Dialog - by SnG.Scot_MisCuDI - 30.12.2011, 04:54
Re: Any Cmd Opens Dialog - by SnG.Scot_MisCuDI - 30.12.2011, 06:01
Re: Any Cmd Opens Dialog - by [O.z]Caroline - 30.12.2011, 06:11
Re: Any Cmd Opens Dialog - by SnG.Scot_MisCuDI - 30.12.2011, 06:15
Re: Any Cmd Opens Dialog - by [O.z]Caroline - 30.12.2011, 06:22
Re: Any Cmd Opens Dialog - by AustinJ - 30.12.2011, 06:24
Re: Any Cmd Opens Dialog - by SnG.Scot_MisCuDI - 30.12.2011, 06:28
Re: Any Cmd Opens Dialog - by Gh05t_ - 30.12.2011, 13:59

Forum Jump:


Users browsing this thread: 2 Guest(s)