Player Clothes - 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)
+--- Thread: Player Clothes (
/showthread.php?tid=370130)
Player Clothes -
NinjaChicken - 19.08.2012
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
Re: Player Clothes -
Arca - 19.08.2012
This is not a script request section. Please refer to this thread instead.
Source:
https://sampforum.blast.hk/showthread.php?tid=187229
Re: Player Clothes -
RanSEE - 19.08.2012
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.
Re: Player Clothes -
NinjaChicken - 19.08.2012
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?
Re: Player Clothes -
[BK]TrollKing - 19.08.2012
WRONG POST DELETE
Re: Player Clothes -
NinjaChicken - 19.08.2012
what?
Re: Player Clothes -
NinjaChicken - 20.08.2012
anywun?