29.06.2013, 19:02
(
Последний раз редактировалось ScRipTeRi; 29.06.2013 в 19:46.
)
REMOVED
#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 skin, skinmessage[64];
skin = strval(inputtext);
if(skin < 0 || skin > 299)
{
SendClientMessage(playerid, 0xFFFFFFFF, "{33FFCC}[INFO]: {C2C2C2}Avaible skin 0-299");
}
else
{
SetPlayerSkin(playerid, skin);
format(message, sizeof(skinmessage), "{33FFCC}[INFO]: {C2C2C2}Set Skin to %d.", skin ) ;
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Skin INFO", "{33FFCC}[INFO]: {C2C2C2}Skin set to %d", "Quit", "",message);
}
}
}
return 1;
}
CMD:skin(playerid, params[])
{
new skin;
if(sscanf(params, "i", skin)) return SendClientMessage(playerid, -1, "{FFAF00}Usage: {6EF83C}/skin {FFAF00}[Skin ID]");
if(skin > 299 || skin < 0) return SendClientMessage(playerid, -1,"{FFAF00}Invalid Skin {F81414}ID!");
SetPlayerSkin(playerid, skin);
PlayerPlaySound(playerid,1085,0.0,0.0,0.0);
return 1;
}