Доступ к архиву

Переход в группу "Пользователь"

300.00 ₽
Одноразовый платёж
Быстрый переход в группу "Пользователи", без надобности написания постов и ожидания.

Покупка дает возможность:
Быть полноправным участником форума
Нормальное копирование кода
Создавать темы
Скачивать файлы
Доступ к архиву Pawno-Info

Скин

Статус
В этой теме нельзя размещать новые ответы.

Tema003

Ученик
Добрый вечер.
Когда игрок покупает скин в магазине.То у кого-то на сервере тоже меняется скин на какой нибудь. В чем причина ??


Может нужно
Код:
	new para1;
    switch(dialogid)
	{
    case 221:
    {
        if(response) ClothesSex[playerid] = 1;
        else ClothesSex[playerid] = 2;
        ShowPlayerDialog(playerid,222,2,"Магазин Одежды","{A0B0D0}Спортивная одежда\nДеловая одежда\nПовседневная одежда\nНазад","Выбрать","Выйти");
        return 1;
    }
    case 222: // Магазин Одежды
    {
        if(!response)
        {
              SetCameraBehindPlayer(playerid); TogglePlayerControllable(playerid, 1);
              SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
              ClothesRun[playerid] = 0;
            return 1;
        }
        else
        {
            switch(listitem)
            {
                case 0: {
                    ClothesStyle[playerid] = 1;
                    ShowPlayerDialog(playerid,224,0,"Спортивная одежда","Выберите нужную:","Дальше","Выбрать");
                    return 1; }
                case 1: {
                    ClothesStyle[playerid] = 2;
                    ShowPlayerDialog(playerid,224,0,"Деловая одежда","Выберите нужную:","Дальше","Выбрать");
                    return 1; }
                case 2: {
                    ClothesStyle[playerid] = 3;
                    ShowPlayerDialog(playerid,224,0,"Повседневная одежда","Выберите нужную:","Дальше","Выбрать");
                    return 1; }
                case 3: return ShowPlayerDialog(playerid,221,0,"Магазин одежды","Выберите вид одежды:","Мужской","Женский");
            }
        }
    }
    case 224:
    {
        if(response)
        {
            if(ClothesStyle[playerid] == 1)
            {
                if(ClothesSex[playerid] == 1)
                {
                    ClothesRun[playerid]++;
                    if(ClothesRun[playerid] >= sizeof(SportSkinMale)) ClothesRun[playerid] = 0;
                       SetPlayerSkin(playerid, SportSkinMale[ClothesRun[playerid]]);
                }
                else if(ClothesSex[playerid] == 2)
                {
                    ClothesRun[playerid]++;
                    if(ClothesRun[playerid] >= sizeof(SportSkinFemale)) ClothesRun[playerid] = 0;
                       SetPlayerSkin(playerid, SportSkinFemale[ClothesRun[playerid]]);
                }
            }
            else if(ClothesStyle[playerid] == 2)
            {
                if(ClothesSex[playerid] == 1)
                {
                    ClothesRun[playerid]++;
                    if(ClothesRun[playerid] >= sizeof(DelovSkinMale)) ClothesRun[playerid] = 0;
                       SetPlayerSkin(playerid, DelovSkinMale[ClothesRun[playerid]]);
                }
                else if(ClothesSex[playerid] == 2)
                {
                    ClothesRun[playerid]++;
                    if(ClothesRun[playerid] >= sizeof(DelovSkinFemale)) ClothesRun[playerid] = 0;
                       SetPlayerSkin(playerid, DelovSkinFemale[ClothesRun[playerid]]);
                }
            }
            else if(ClothesStyle[playerid] == 3)
            {
                if(ClothesSex[playerid] == 1)
                {
                    ClothesRun[playerid]++;
                    if(ClothesRun[playerid] >= sizeof(PovseSkinMale)) ClothesRun[playerid] = 0;
                       SetPlayerSkin(playerid, PovseSkinMale[ClothesRun[playerid]]);
                }
                else if(ClothesSex[playerid] == 2)
                {
                    ClothesRun[playerid]++;
                    if(ClothesRun[playerid] >= sizeof(PovseSkinFemale)) ClothesRun[playerid] = 0;
                       SetPlayerSkin(playerid, PovseSkinFemale[ClothesRun[playerid]]);
                }
            }
            ShowPlayerDialog(playerid,224,0,"Повседневная одежда","Выберите нужную:","Дальше","Выбрать");
            return 1;
        }
        else return ShowPlayerDialog(playerid,225,0,"Касса","{A0B0D0}Хотите {7CC000}взять эту одежду?","Да","Нет");
    }
    case 225: // Покупка одежды
    {
        if(response)
        {
            	if(ClothesStyle[playerid] == 1) {
            	if(ClothesSex[playerid] == 1) PlayerInfo[para1][pChar] = SportSkinMale[ClothesRun[playerid]];
            	else if(ClothesSex[playerid] == 2) PlayerInfo[para1][pChar] = SportSkinFemale[ClothesRun[playerid]]; }
            	else if(ClothesStyle[playerid] == 2) {
            	if(ClothesSex[playerid] == 1) PlayerInfo[para1][pChar] = DelovSkinMale[ClothesRun[playerid]];
            	else if(ClothesSex[playerid] == 2) PlayerInfo[para1][pChar] = DelovSkinFemale[ClothesRun[playerid]]; }
            	else if(ClothesStyle[playerid] == 3) {
            	if(ClothesSex[playerid] == 1) PlayerInfo[para1][pChar] = PovseSkinMale[ClothesRun[playerid]];
            	else if(ClothesSex[playerid] == 2) PlayerInfo[para1][pChar] = PovseSkinFemale[ClothesRun[playerid]]; }
             	SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
            	ClothesRun[playerid] = 0;
            	SendClientMessage(playerid, COLOR_YELLOW, "* Вы взяли новую одежду");
              	SetCameraBehindPlayer(playerid); TogglePlayerControllable(playerid, 1);
              	return 1;
        		}
        		else
        		{
             	SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
            	ClothesRun[playerid] = 0;
            	ShowPlayerDialog(playerid,222,2,"Магазин Одежды","{A0B0D0}Спортивная одежда\n{A0B0D0}Деловая одежда\n{A0B0D0}Повседневная одежда\n{A0B0D0}Назад","Выбрать","Выйти");
            	return 1;
        	}
    	}
	}
Далее
Код:
static SportSkinMale[] = { // Спортивные скины мужские
22,51,52,96,97,99,154,252 };
static SportSkinFemale[] = { // Спортивные скины женские
13,38,41,88,90,92,138,139,140,251 };
static DelovSkinMale[] = { // Деловые скины мужские
17,57,59,82,83,84,98,153,187,221,227,228,240,255 };
static DelovSkinFemale[] = { // Деловые скины женские
9,11,40,55,76,141,148,169,211,215,219,224,225,233,256,263 };
static PovseSkinMale[] = { // Повседневные скины мужчины
7,14,15,18,19,20,21,230,26,27,28,29,30,32,35,36,37,44,45,47,48 //
,49,50,58,60,73,78,94,95,101,132,133,134,135,136,142,143,156 //
,158,160,170,184,185,188,202,206,210,217,220,222,223,229,230 //
,236,247,249,250,261, }; //
static PovseSkinFemale[] = { // Повседневные скины женские
10,12,31,39,54,56,64,69,89,93,129,130,131,151,152,157 //
,190,191,192,196,197,199,207,218,226,231,232,237,245 }; //
 
Последнее редактирование:
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу