SA-MP Forums Archive
Dialog Input Skin System - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Dialog Input Skin System (/showthread.php?tid=205703)



Dialog Input Skin System - PlayerID - 02.01.2011

Hi, where can i get Dialog Skin System?


Re: Dialog Input Skin System - HyperZ - 02.01.2011

https://sampwiki.blast.hk/wiki/How_to_Create_a_Dialog
https://sampwiki.blast.hk/wiki/ShowPlayerDialog
https://sampwiki.blast.hk/wiki/Dialog_Styles


Re: Dialog Input Skin System - PlayerID - 02.01.2011

No, i don't know how to make, can you make it for me pls?


Re: Dialog Input Skin System - HyperZ - 02.01.2011

pawn Код:
#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;
}



Re: Dialog Input Skin System - PlayerID - 02.01.2011

Errors.
Quote:

Desktop\Untitled.pwn(4) : warning 235: public function lacks forward declaration (symbol "OnPlayerCommandText")
Desktop\Untitled.pwn(6) : error 017: undefined symbol "strcmp"
Desktop\Untitled.pwn( : error 017: undefined symbol "ShowPlayerDialog"
Desktop\Untitled.pwn(14) : warning 235: public function lacks forward declaration (symbol "OnDialogResponse")
Desktop\Untitled.pwn(21) : error 017: undefined symbol "strval"
Desktop\Untitled.pwn(24) : error 017: undefined symbol "SendClientMessage"
Desktop\Untitled.pwn(2 : error 017: undefined symbol "SetPlayerSkin"
Desktop\Untitled.pwn(29) : error 017: undefined symbol "format"
Desktop\Untitled.pwn(29) : warning 202: number of arguments does not match definition
Desktop\Untitled.pwn(29) : warning 202: number of arguments does not match definition
Desktop\Untitled.pwn(29) : warning 202: number of arguments does not match definition
Desktop\Untitled.pwn(30) : error 017: undefined symbol "SendClientMessage"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


7 Errors.




Re: Dialog Input Skin System - HyperZ - 02.01.2011

Are you sure you have '#include <a_samp>' on top of your script?


Re: Dialog Input Skin System - PlayerID - 02.01.2011

No....


Re: Dialog Input Skin System - HyperZ - 02.01.2011

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;
}



Re: Dialog Input Skin System - PlayerID - 02.01.2011

Its working thanks


Re: Dialog Input Skin System - HyperZ - 02.01.2011

You're welcome..