Dialog Input Skin System
#8

Ok use this and tell me its working?
pawn Код:
#include <a_samp>
#define Skin 120

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/changeskin", cmdtext, true, 10) == 0)
    {
        ShowPlayerDialog(playerid, Skin, DIALOG_STYLE_INPUT, "Change Skin", "Enter a skin ID below to get started", "Confirm", "Cancel");
        return 1;
    }
    return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == Skin)
    {
        if(response)
        {
            new skinid, message[64];
            skinid = strval(inputtext);
            if(skinid < 0 || skinid > 299)
            {
                SendClientMessage(playerid, 0x33FF33AA, "Error: Choose a skin ID between 0 and 299.");
            }
            else
            {
                SetPlayerSkin(playerid, skinid);
                format(message, sizeof(message), "You have successfully changed your skin id to %d.", skinid);
                SendClientMessage(playerid, 0x33FF33AA, message);
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
Dialog Input Skin System - by PlayerID - 02.01.2011, 03:43
Re: Dialog Input Skin System - by HyperZ - 02.01.2011, 03:44
Re: Dialog Input Skin System - by PlayerID - 02.01.2011, 03:45
Re: Dialog Input Skin System - by HyperZ - 02.01.2011, 03:47
Re: Dialog Input Skin System - by PlayerID - 02.01.2011, 03:50
Re: Dialog Input Skin System - by HyperZ - 02.01.2011, 03:51
Re: Dialog Input Skin System - by PlayerID - 02.01.2011, 03:52
Re: Dialog Input Skin System - by HyperZ - 02.01.2011, 03:53
Re: Dialog Input Skin System - by PlayerID - 02.01.2011, 03:55
Re: Dialog Input Skin System - by HyperZ - 02.01.2011, 03:56

Forum Jump:


Users browsing this thread: 4 Guest(s)