Добро пожаловать на Pro Pawn - Портал о PAWN-скриптинге.

Реклама


**Как получить V.I.P** (Перейти)
Чтобы заказать рекламу на Pro-Pawn.Ru, обращайтесь в Skype.
Баннерная реклама 200руб/мес, Текстовая 100руб/мес.
Страница 1 из 3 123 ПоследняяПоследняя
Показано с 1 по 10 из 24
  1. #1
    Аватар для ALIT13
    Пользователь

    Статус
    Оффлайн
    Регистрация
    24.05.2014
    Сообщений
    250
    Репутация:
    2 ±

    Оптимизация кода

    Как можно упростить код этот
    PHP код:
    if(clickedid == SkinRabLeft)
        {
            switch (
    SelectCharID[playerid])
            {
                case 
    1// LSPD
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[0][0]); SelectCharPlace[playerid] = 8SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[1][0]); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[2][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playeridJoinPed[3][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playeridJoinPed[4][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 6) { SetPlayerSkin(playeridJoinPed[5][0]); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 7) { SetPlayerSkin(playeridJoinPed[6][0]); SelectCharPlace[playerid] = 6SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 8) { SetPlayerSkin(playeridJoinPed[7][0]); SelectCharPlace[playerid] = 7SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
                case 
    2// FBI
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[8][0]); SelectCharPlace[playerid] = 6SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[9][0]); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[10][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playeridJoinPed[11][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playeridJoinPed[12][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 6) { SetPlayerSkin(playeridJoinPed[13][0]); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
                case 
    3// Army SF
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[91][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[89][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid179); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
                case 
    4// Medics SF
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[16][0]); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[17][0]); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[18][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playeridJoinPed[19][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playeridJoinPed[20][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
                case 
    5// La Cosa Nostra
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[21][0]); SelectCharPlace[playerid] = 6SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[22][0]); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[23][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playeridJoinPed[24][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid290); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid119); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
                case 
    6// Yakuza
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[25][0]); SelectCharPlace[playerid] = 6SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[26][0]); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[27][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playeridJoinPed[28][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid121); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid122); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
                case 
    7// Goverment
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[29][0]); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[30][0]); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[31][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playeridJoinPed[32][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playeridJoinPed[33][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
                case 
    8// Casino Caligula
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid189); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[46][0]); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[47][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
                case 
    10// SFPD
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[34][0]); SelectCharPlace[playerid] = 8SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[35][0]); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[36][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playeridJoinPed[37][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playeridJoinPed[38][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 6) { SetPlayerSkin(playeridJoinPed[39][0]); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 7) { SetPlayerSkin(playeridJoinPed[40][0]); SelectCharPlace[playerid] = 6SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 8) { SetPlayerSkin(playeridJoinPed[41][0]); SelectCharPlace[playerid] = 7SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
                case 
    11// Instructors
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[48][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[49][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[51][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid171); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid194); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
                case 
    12// Ballas
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[74][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[75][0]); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[76][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid195); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
                case 
    13// Vagos
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[80][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[81][0]); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[82][0]); SelectCharPlace[playerid] = 2;SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid226); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
                case 
    14// Russian Mafia
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[60][0]); SelectCharPlace[playerid] = 6SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[61][0]); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[62][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playeridJoinPed[63][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playeridJoinPed[64][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid3); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
                case 
    15// Grove
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[65][0]); SelectCharPlace[playerid] = 8SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[66][0]); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[67][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playeridJoinPed[68][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playeridJoinPed[69][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 6) { SetPlayerSkin(playeridJoinPed[70][0]); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid56); SelectCharPlace[playerid] = 6SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 8) { SetPlayerSkin(playerid293); SelectCharPlace[playerid] = 7SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
                case 
    16// SA News
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[85][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[86][0]); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[87][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playeridJoinPed[88][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
                case 
    17// Aztek
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[71][0]); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[72][0]); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[73][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid226); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid292); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
                case 
    18// Rifa
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[77][0]); SelectCharPlace[playerid] = 6SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[78][0]); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[79][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid30); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid226); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid273); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
                case 
    19// Army LV
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[91][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[89][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid179); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
                case 
    21// LVPD
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[52][0]); SelectCharPlace[playerid] = 8SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[53][0]); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[54][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playeridJoinPed[55][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playeridJoinPed[56][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 6) { SetPlayerSkin(playeridJoinPed[57][0]); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 7) { SetPlayerSkin(playeridJoinPed[58][0]); SelectCharPlace[playerid] = 6SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 8) { SetPlayerSkin(playeridJoinPed[59][0]); SelectCharPlace[playerid] = 7SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
                case 
    22// Хитманы
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid246); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid248); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid247); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid181); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
            }
        }
        
    //--------------------------------------------------------------------------
        
    if(clickedid == SkinRabSelect)
        {
            
    PlayerInfo[playerid][pSkin] = GetPVarInt(playerid,"InviteSkin");
            
    //forma[playerid] = 0;
            
    SetPlayerVirtualWorld(playerid,0);
            
    SelectCharPlace[playerid] = 0;
            
    SelectCharID[playerid] = 0;
            
    TogglePlayerControllable(playerid,1);
            
    CancelSelectTextDraw(playerid);
            
    SpawnPlayer(playerid);
              
    TextDrawHideForPlayer(playerid,SkinRabSelect);
            
    TextDrawHideForPlayer(playerid,SkinRabRight);
            
    TextDrawHideForPlayer(playerid,SkinRabLeft);
            
    TextDrawHideForPlayer(playerid,SkinRabCancel);
        }
        
    //--------------------------------------------------------------------------
        
    if(clickedid == SkinRabRight)
        {
            switch (
    SelectCharID[playerid])
            {
            case 
    1// LSPD
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[0][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[1][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[2][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playeridJoinPed[3][0]); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playeridJoinPed[4][0]); SelectCharPlace[playerid] = 6SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 6) { SetPlayerSkin(playeridJoinPed[5][0]); SelectCharPlace[playerid] = 7SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 7) { SetPlayerSkin(playeridJoinPed[6][0]); SelectCharPlace[playerid] = 8SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 8) { SetPlayerSkin(playeridJoinPed[7][0]); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
            case 
    2// FBI
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[8][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[9][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[10][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playeridJoinPed[11][0]); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playeridJoinPed[12][0]); SelectCharPlace[playerid] = 6SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 6) { SetPlayerSkin(playeridJoinPed[13][0]); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
            case 
    3// Army SF
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[91][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[89][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid179); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
            case 
    4// Medics SF
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[16][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[17][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[18][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playeridJoinPed[19][0]); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playeridJoinPed[20][0]); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
            case 
    5// La Cosa Nostra
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[21][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[22][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[23][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playeridJoinPed[24][0]); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid290); SelectCharPlace[playerid] = 6SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid119); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
            case 
    6// Yakuza
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[25][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[26][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[27][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playeridJoinPed[28][0]); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid121); SelectCharPlace[playerid] = 6SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid122); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
            case 
    7// Goverment
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[29][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[30][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[31][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playeridJoinPed[32][0]); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playeridJoinPed[33][0]); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
            case 
    8// Casino Caligula
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid189); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[46][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[47][0]); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
            case 
    10// SFPD
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[34][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[35][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[36][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playeridJoinPed[37][0]); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playeridJoinPed[38][0]); SelectCharPlace[playerid] = 6SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 6) { SetPlayerSkin(playeridJoinPed[39][0]); SelectCharPlace[playerid] = 7SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 7) { SetPlayerSkin(playeridJoinPed[40][0]); SelectCharPlace[playerid] = 8SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 8) { SetPlayerSkin(playeridJoinPed[41][0]); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
            case 
    11// Instructors
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[48][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[49][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[51][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid171); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid194); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
            case 
    12// Ballas
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[74][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[75][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[76][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid195); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
            case 
    13// Vagos
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[80][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[81][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[82][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid226); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
            case 
    14// Russian Mafia
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[60][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[61][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[62][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playeridJoinPed[63][0]); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playeridJoinPed[64][0]); SelectCharPlace[playerid] = 6SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid3); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
            case 
    15// Grove
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[65][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[66][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[67][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playeridJoinPed[68][0]); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playeridJoinPed[69][0]); SelectCharPlace[playerid] = 6SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 6) { SetPlayerSkin(playeridJoinPed[70][0]); SelectCharPlace[playerid] = 7SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid56); SelectCharPlace[playerid] = 8SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 8) { SetPlayerSkin(playerid293); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
            case 
    16// SA News
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[85][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[86][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[87][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playeridJoinPed[88][0]); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
            case 
    17// Aztek
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[71][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[72][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[73][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid226); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid292); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
            case 
    18// Rifa
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[77][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[78][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[79][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid30); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid226); SelectCharPlace[playerid] = 6SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid273); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
            case 
    19// Army LV
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[91][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[89][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid179); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
            case 
    21// LVPD
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[52][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[53][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[54][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playeridJoinPed[55][0]); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playeridJoinPed[56][0]); SelectCharPlace[playerid] = 6SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 6) { SetPlayerSkin(playeridJoinPed[57][0]); SelectCharPlace[playerid] = 7SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 7) { SetPlayerSkin(playeridJoinPed[58][0]); SelectCharPlace[playerid] = 8SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 8) { SetPlayerSkin(playeridJoinPed[59][0]); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
            case 
    22// Хитманы
                
    {
                    if(
    SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid247); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid181); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid246); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid248); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); }
                }
            }
        } 

  2. #2
    Аватар для BadPawn
    Пользователь

    Статус
    Оффлайн
    Регистрация
    15.01.2016
    Адрес
    Приморье, Спасск-Дальний
    Сообщений
    165
    Репутация:
    7 ±
    вместо if esle, запустить очередной switch

    - - - Добавлено - - -

    PHP код:
    if(clickedid == SkinRabLeft)
        {
            switch (
    SelectCharID[playerid])
            {
                case 
    1// LSPD
                
    {
                    switch(
    SelectCharPlace[playerid])
                    {
                        case 
    1SetPlayerSkin(playeridJoinPed[0][0]); SelectCharPlace[playerid] = 8SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid));
                        case 
    2SetPlayerSkin(playeridJoinPed[1][0]); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid));
                        case 
    3SetPlayerSkin(playeridJoinPed[2][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid));
                        case 
    4SetPlayerSkin(playeridJoinPed[3][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid));
                        case 
    5SetPlayerSkin(playeridJoinPed[4][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid));
                        case 
    6SetPlayerSkin(playeridJoinPed[5][0]); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid));
                        case 
    7SetPlayerSkin(playeridJoinPed[6][0]); SelectCharPlace[playerid] = 6SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid));
                        case 
    8SetPlayerSkin(playeridJoinPed[7][0]); SelectCharPlace[playerid] = 7SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid));
                    } 
    так

  3. #3
    Аватар для Fantom
    Пользователь

    Статус
    Оффлайн
    Регистрация
    20.01.2016
    Сообщений
    16
    Репутация:
    0 ±
    Цитата Сообщение от BadPawn Посмотреть сообщение
    вместо if esle, запустить очередной switch
    И где тут оптимизация?
     Цитаты великих критиков
    Цитата Сообщение от Fantom
    Скриптер не должен строить свою жизнь вокруг трафика с Яндекса. Это не должно быть вопросом жизни и смерти сервера.
    Цитата Сообщение от DeimoS Посмотреть сообщение
    А что мешало просто взять и попробовать? ;) Или обязательно нужно было услышать: "да, можно"?

  4. #4
    Аватар для Роуди.
    Пользователь

    Статус
    Оффлайн
    Регистрация
    31.07.2015
    Сообщений
    151
    Репутация:
    17 ±
    Сколько от Вас однотипных тем за погоней миллисекунд, госпадя..

  5. Пользователь сказал cпасибо:
    $continue$ (21.01.2016)
  6. #5
    Аватар для BadPawn
    Пользователь

    Статус
    Оффлайн
    Регистрация
    15.01.2016
    Адрес
    Приморье, Спасск-Дальний
    Сообщений
    165
    Репутация:
    7 ±
    Цитата Сообщение от Fantom Посмотреть сообщение
    И где тут оптимизация?
    Есть варианты получше? Так вот, вместо того, что бы следить за мной, лучше бы подсказал парню, как лучше сделать, а не умничать по беспонтовой. Сказал сколько знаю, знаешь больше, предлагай.

  7. #6
    Аватар для Fantom
    Пользователь

    Статус
    Оффлайн
    Регистрация
    20.01.2016
    Сообщений
    16
    Репутация:
    0 ±
    Цитата Сообщение от BadPawn Посмотреть сообщение
    Есть варианты получше? Так вот, вместо того, что бы следить за мной, лучше бы подсказал парню, как лучше сделать, а не умничать по беспонтовой. Сказал сколько знаю, знаешь больше, предлагай.
    Дак это даже не вариант у Вас получилось. Это как сказать вместо слово "Да", слово "Yes". Пишется по разному, но смысл один и тот же. Твой "вариант" это скорее всего "упрощение" строк, но увы, это никак не влияет на производительность.
     Цитаты великих критиков
    Цитата Сообщение от Fantom
    Скриптер не должен строить свою жизнь вокруг трафика с Яндекса. Это не должно быть вопросом жизни и смерти сервера.
    Цитата Сообщение от DeimoS Посмотреть сообщение
    А что мешало просто взять и попробовать? ;) Или обязательно нужно было услышать: "да, можно"?

  8. #7
    Аватар для Daniel_Cortez
    new fuck_logic[0] = EOS;

    Статус
    Оффлайн
    Регистрация
    06.04.2013
    Адрес
    Novokuznetsk, Russia
    Сообщений
    1,662
    Репутация:
    2145 ±
    Цитата Сообщение от Fantom Посмотреть сообщение
    Твой "вариант" это скорее всего "упрощение" строк, но увы, это никак не влияет на производительность.
    Пруфы?
    Индивидуально в PM и Skype по скриптингу не помогаю. Задавайте все свои вопросы здесь (click).
    SA-MP 0.4 is a lie

  9. #8
    Аватар для vovandolg
    Пользователь

    Статус
    Оффлайн
    Регистрация
    17.11.2015
    Адрес
    Stavropol
    Сообщений
    1,360
    Репутация:
    113 ±
    GetPlayerSkin(playerid) залепить в одну переменную + вариант с case как выше.
    _____________
    Цитата Сообщение от Fantom Посмотреть сообщение
    Дак это даже не вариант у Вас получилось. Это как сказать вместо слово "Да", слово "Yes". Пишется по разному, но смысл один и тот же. Твой "вариант" это скорее всего "упрощение" строк, но увы, это никак не влияет на производительность.
    В какой то теме я видел что если значений много то лучше использовать вариант со switch, так как там была разница в цифрах, switch работает быстрее варианта if,else if в некоторых вариантах, но только если их много, а для двух трёх значений вполне хватит if, else if.
    Последний раз редактировалось vovandolg; 20.01.2016 в 21:54.

  10. #9
    Аватар для ziggi
    Проверенный

    Статус
    Оффлайн
    Регистрация
    14.05.2015
    Сообщений
    1,035
    Репутация:
    702 ±
    Честно говоря, я в ужасе. О чём вы вообще думаете, когда пишете подобный код? Главной задачей любого компьютера является помощь человеку в выполнении рутинных действий. А вы все рутинные действия взяли на себя, тогда какой, по вашему, смысл в программировании?
    PHP код:
    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playeridJoinPed[0][0]); SelectCharPlace[playerid] = 8SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); } 
    else if(
    SelectCharPlace[playerid] == 2) { SetPlayerSkin(playeridJoinPed[1][0]); SelectCharPlace[playerid] = 1SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); } 
    else if(
    SelectCharPlace[playerid] == 3) { SetPlayerSkin(playeridJoinPed[2][0]); SelectCharPlace[playerid] = 2SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); } 
    else if(
    SelectCharPlace[playerid] == 4) { SetPlayerSkin(playeridJoinPed[3][0]); SelectCharPlace[playerid] = 3SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); } 
    else if(
    SelectCharPlace[playerid] == 5) { SetPlayerSkin(playeridJoinPed[4][0]); SelectCharPlace[playerid] = 4SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); } 
    else if(
    SelectCharPlace[playerid] == 6) { SetPlayerSkin(playeridJoinPed[5][0]); SelectCharPlace[playerid] = 5SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); } 
    else if(
    SelectCharPlace[playerid] == 7) { SetPlayerSkin(playeridJoinPed[6][0]); SelectCharPlace[playerid] = 6SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); } 
    else if(
    SelectCharPlace[playerid] == 8) { SetPlayerSkin(playeridJoinPed[7][0]); SelectCharPlace[playerid] = 7SetPVarInt(playerid,"InviteSkin",GetPlayerSkin(playerid)); } 
    Эти 40 (после нормального форматирования) ужасных строчек кода, можно записать вот так просто:
    PHP код:
    if (SelectCharPlace[playerid] == 1) {
        
    SelectCharPlace[playerid] = 8;
    } else {
        
    SelectCharPlace[playerid]--;
    }

    new 
    skinid JoinPedSelectCharPlace[playerid] - ][0];

    SetPlayerSkin(playeridskinid);
    SetPVarInt(playerid,"InviteSkin"skinid); 
    Остальное пишите сами, может чему-нибудь научитесь.

  11. 3 пользователя(ей) сказали cпасибо:
    Daniel_Cortez (20.01.2016)Processing (10.02.2016)vovandolg (20.01.2016)
  12. #10
    Аватар для vovandolg
    Пользователь

    Статус
    Оффлайн
    Регистрация
    17.11.2015
    Адрес
    Stavropol
    Сообщений
    1,360
    Репутация:
    113 ±
    А если SelectCharPlace[playerid] перевести в PVar будет быстрее или так же?

 

 
Страница 1 из 3 123 ПоследняяПоследняя

Информация о теме

Пользователи, просматривающие эту тему

Эту тему просматривают: 1 (пользователей: 0 , гостей: 1)

Ваши права

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения
  •