Player Clothes
#1

ok can someone make it so if a player enters a certain point XYZ a dialog pops up allowing them to enter a new skin ID but also give them a message press cancel to keep the current one and it must save using

[pModel] thx
Reply
#2

This is not a script request section. Please refer to this thread instead.

Source: https://sampforum.blast.hk/showthread.php?tid=187229
Reply
#3

When player types /skin a dialog pops up asking them to insert a ID, sigh.

Post Your Code request here...

pawn Код:
#include <a_samp>
#include <a_players>

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/skin", true) == 0)
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Skin Change", "Enter the skin id you wish to have below", "Confirm", "Cancel");
        return 1;
    }
    return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1)
    {
        if(response)
        {
            new skinid, message[64];
            skinid = strval(inputtext);
            if(skinid < 0 || skinid > 299)
            {
                SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Skin id may be between 0 and 299.");
            }
            else
            {
                SetPlayerSkin(playerid, skinid);
                format(message, sizeof(message), "SERVER: You have changed your skin id to %d.", skinid);
                SendClientMessage(playerid, 0xFFFFFFFF, message);
            }
        }
    }
    return 1;
}
When player stand at a check point dialog pops up prompting them to enter skin ID

pawn Код:
new minimenu; // Will be at Top
minimenu = CreatePickup(234, 23, -2348.942,261.415,2.65); //put this under ongamemodeinit and change the position to binco or anything
public OnPlayerPickUpPickup(playerid, pickupid)
{
  if(pickupid == minimenu)
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Rich", "Poor", "Select", "Cancel");!");
    }
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
          new string[128];

          if(dialogid == 1 )
          {
              if(!response)
              {
                ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "
nRich", "nPoor", "Select", "Cancel");
                TogglePlayerControllable(playerid, 0);
                }

              if(response)
              {
                if(listitem == 0)
                {
                     SetPlayerSkin(playerid,23); // choose the skin id by changing the 23 ...
              }
            }
          if(listitem == 1)
                {
           SetPlayerSkin(playerid, 25); ///// for this one also
          }
      return 1;
}
This code might generate errors.
Reply
#4

yea it did can you please clean it up and also when they enter the checkpoint can they enter their own skin id that they want?
Reply
#5

WRONG POST DELETE
Reply
#6

what?
Reply
#7

anywun?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)