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

Реклама


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

    Статус
    Оффлайн
    Регистрация
    21.09.2014
    Сообщений
    9
    Репутация:
    0 ±

    Не работают паблики кликабельных текстдравов.

    Привет, вот столкнулся с такой проблемой:
    Не работают паблики OnPlayerClickTextDraw и OnPlayerClickPlayerTextDraw, не вызываются функции. Все перепробовал, не знаю что делать -_-.
    С чем может быть связано? Кто помочь может, можете еще в скайп написать: Kennycross11. Заранее спасибо.

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

    Статус
    Оффлайн
    Регистрация
    02.08.2014
    Адрес
    г. Киров (aka Вятка)
    Сообщений
    1,441
    Репутация:
    261 ±
    А код может покажете?

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

    Статус
    Оффлайн
    Регистрация
    21.09.2014
    Сообщений
    9
    Репутация:
    0 ±
    PHP код:
    }
    public 
    OnPlayerClickPlayerTextDraw(playeridPlayerText:playertextid)
    {
        if(
    playertextid == MenuforPlayer[playerid][19]) {
            
    ShowPlayerDialog(playerid12800DIALOG_STYLE_INPUT"Îòïðàâèòü æàëîáó""Âû ñîáèðàåòåñü îòïðàâèòü àäìèíèñòðàöèè ñîîáùåíèå ñ æàëîáîé\nÎòïðîâëÿéòå ïî ôîðìå [ID/íèê íàðóøèòèëÿ] [Òåêñò æàëîáû]""Îòïðàâèòü""Íàçàä");
            return 
    1;
        }
        if(
    playertextid == MenuforPlayer[playerid][21]) {
            
    ShowPlayerDialog(playerid,12801,DIALOG_STYLE_LIST," ","Îñíîâíûå\nÄîì\nÁèçíåñ\nÒðàíñïîðò","Âûáðàòü","Îòìåíà");
            return 
    1;
        }
        if(
    playertextid == MenuforPlayer[playerid][23]) {
            new 
    spawnpos[30],status[30];
             
    format(stra,600,"{00FF7F}1. Ñìåíèòü ïàðîëü\n2. Èçìåíèòü spawn. Òåêóùèé: %s\n3. Îòîáðàæåíèå ID èãðîêîâ â ÷àòå [%s{ffffff}]\n{C0C0C0}4. Ñîõðàíèòü âñå íàñòðîéêè",spawnpos,status);
            
    ShowPlayerDialog(playerid12DIALOG_STYLE_LIST"Ìîè íàñòðîéêè",stra,"Âûáðàòü","Íàçàä");
            return 
    1;
        }
         if(
    playertextid == Buyinshop[playerid][10] )
          {
              if(
    p_info[playerid][p_map] == 1)  SendClientMessage(playeridwhite"Ó âàñ åñòü êàðòà !");
            if(
    p_info[playerid][p_map] == 0)  ShowPlayerDialog(playerid,895,DIALOG_STYLE_MSGBOX,"Ïîêóïêà òîâàðà","Âû äåéñòâèòåëüíî õîòèòå êóïèòü êàðòó ?\nÖåíà 10$","Äà","Íåò");
              return 
    1;
        }
         if(
    playertextid == Buyinshop[playerid][7] )
          {
              if(
    p_info[playerid][p_gps] == 1)  SendClientMessage(playeridwhite"Ó âàñ åñòü GPS !");
            if(
    p_info[playerid][p_gps] == 0)  ShowPlayerDialog(playerid,896,DIALOG_STYLE_MSGBOX,"Ïîêóïêà òîâàðà","Âû äåéñòâèòåëüíî õîòèòå êóïèòü GPS ?\nÖåíà 45$","Äà","Íåò");
              return 
    1;
        }
        if(
    playertextid == RegistrationforPlayer[playerid][0])
        {
            
    ShowPlayerDialog(playerid5DIALOG_STYLE_MSGBOX"Ïîë ïåðñîíàæà","\n","Ìóæ÷èíà""Æåíùèíà");
            return 
    1;
        }
        if(
    playertextid == RegistrationforPlayer[playerid][1])
        {
            
    ShowPlayerDialog(playerid,1289,DIALOG_STYLE_LIST,"ßçûê","Èòàëüÿíñêèé\nÈñïàíñêèé\nÔðàíöóçñêèé\nßïîíñêèé\nÐóññêèé\nÏîðòóãàëüñêèé","Âûáðàòü","Îòìåíà");
            return 
    1;
        }
        if(
    playertextid == RegistrationforPlayer[playerid][2])
        {
            
    ShowPlayerDialog(playerid,1290,1,"Âîçðàñò ïåðñîíàæà","\n","Âûáðàòü","Îòìåíà");
            return 
    1;
        }
        if(
    playertextid == RegistrationforPlayer[playerid][3])
        {
            
    ShowPlayerDialog(playerid,1291,DIALOG_STYLE_LIST,"Öâåò êîæè","Áåëûé\n×åðíûé","Âûáðàòü","Îòìåíà");
            return 
    1;
        }
        return 
    1;
    }
    public 
    OnPlayerClickTextDraw(playeridText:clickedid) {
        {
        if(
    _:clickedid== INVALID_TEXT_DRAW// ESC
        
    {
        if(
    WoodJob[playerid] == 1)  for(new j=0<= 20j++) PlayerTextDrawHide(playerid,MineralTextDraw[playerid][j]), TogglePlayerControllable(playerid,1);
        if(
    Menuopen[playerid] == 1) for(new 0!= 26i++) PlayerTextDrawHide(playeridMenuforPlayer[playerid][i]), Menuopen[playerid] = 0;
        if(
    Buyopen[playerid] == 1) for(new 0!= 11i++) PlayerTextDrawHide(playeridBuyinshop[playerid][i]), Buyopen[playerid] = 0;
         }
        if(
    clickedid == AvtoTD[3] && p_select_car[playerid] != -1) {
            new as = 
    GetPVarInt(playerid"check_salon");
            if(
    p_select_car[playerid] > 0p_select_car[playerid]--;
            else 
    p_select_car[playerid] = 4;
            
    DestroyVehicle(p_select_car_car[playerid]);
            
    p_select_car_car[playerid] = AddStaticVehicle(sale_car[as][p_select_car[playerid]],2065.1782,-2169.1785,1114.5313,245.0801,30,1);
            
    format(stra300"%s",VehicleNames[sale_car[as][p_select_car[playerid]] - 400]);
            
    PlayerTextDrawSetString(playeridas_info_text[0][playerid], stra);
              
    //---------------------------------------------------------------
            
    format(stra1300"%d$",sale_car_cost[as][p_select_car[playerid]]);
            
    PlayerTextDrawSetString(playeridas_info_text[1][playerid], stra1);
            return 
    1;
        }
        if(
    clickedid == AvtoTD[4] && p_select_car[playerid] != -1) {
            new as = 
    GetPVarInt(playerid"check_salon");
            if(
    p_select_car[playerid] < 4p_select_car[playerid]++;
            else 
    p_select_car[playerid] = 0;
            
    DestroyVehicle(p_select_car_car[playerid]);
            
    p_select_car_car[playerid] = AddStaticVehicle(sale_car[as][p_select_car[playerid]],2065.1782,-2169.1785,1114.5313,245.0801,30,1);
            
    format(stra300"%s",VehicleNames[sale_car[as][p_select_car[playerid]] - 400]);
            
    PlayerTextDrawSetString(playeridas_info_text[0][playerid], stra);
            
    //----------------------------------------------------------
            
    format(stra1300"%d$",sale_car_cost[as][p_select_car[playerid]]);
            
    PlayerTextDrawSetString(playeridas_info_text[1][playerid], stra1);
            return 
    1;
        }
        if(
    clickedid == AvtoTD[6] && p_select_car[playerid] != -1) {
            new as = 
    GetPVarInt(playerid"check_salon");
            
    p_select_car[playerid] = -1;
            
    DestroyVehicle(p_select_car_car[playerid]);
            
    PlayerTextDrawHide(playeridas_info_text[0][playerid]);
            
    PlayerTextDrawHide(playeridas_info_text[1][playerid]);
            
    TextDrawShowForPlayer(playeridAvtoTD[0]);
            
    TextDrawShowForPlayer(playeridAvtoTD[1]);
            
    TextDrawShowForPlayer(playeridAvtoTD[2]);
            
    TextDrawShowForPlayer(playeridAvtoTD[3]);
            
    TextDrawShowForPlayer(playeridAvtoTD[4]);
            
    TextDrawShowForPlayer(playeridAvtoTD[5]);
            
    TextDrawShowForPlayer(playeridAvtoTD[6]);
            
    CancelSelectTextDraw(playerid);
            
    TogglePlayerControllable(playeridtrue);
            
    SetPlayerPos(playeridas_p_pos[as][3], as_p_pos[as][4], as_p_pos[as][5]);
            
    SetPlayerFacingAngle(playeridas_p_pos[as][6]);
            
    SetPlayerInterior(playerid0);
            
    SetCameraBehindPlayer(playerid);
            
    SetPlayerVirtualWorld(playerid0);
            return 
    1;
        }
        if(
    clickedid == AvtoTD[5] && p_select_car[playerid] != -1) {
            new as = 
    GetPVarInt(playerid"check_salon");
            if(
    p_info[playerid][p_money] < sale_car_cost[as][p_select_car[playerid]]) return err("Íåäîñòàòî÷íî ñðåäñòâ äëÿ ïîêóïêè");
            
    set_money(playerid, -sale_car_cost[as][p_select_car[playerid]]);
            
    PlayAudioStreamForPlayer(playerid"-");
            
    as_info[as][as_balance] += sale_car_cost[as][p_select_car[playerid]];
            
    format(query250"UPDATE `salon` SET `balance` = '%d' WHERE `id` = '%d'"as_info[as][as_balance], as);
            
    mysql_query(connectqueryfalse);
            
    p_info[playerid][p_car_model] = sale_car[as][p_select_car[playerid]];
            
    p_info[playerid][p_car_color][0] = 1;
            
    p_info[playerid][p_car_color][1] = 1;
            
    p_info[playerid][p_car_fuel] = 70.0;
            
    p_info[playerid][p_car_miliage] = 0.0;
            
    p_info[playerid][p_car_engine] = 0;
            
    p_info[playerid][p_car_cost] = sale_car_cost[as][p_select_car[playerid]];
            
    format(query500"INSERT INTO `car` (`id`, `model`, `colors`, `cost`) VALUES ('%d', '%d', '1|1', '%d')",
            
    p_info[playerid][p_id], p_info[playerid][p_car_model], p_info[playerid][p_car_cost]);
            
    mysql_query(connectqueryfalse);
            
    p_select_car[playerid] = -1;
            
    DestroyVehicle(p_select_car_car[playerid]);
            
    PlayerTextDrawHide(playeridas_info_text[0][playerid]);
            
    PlayerTextDrawHide(playeridas_info_text[1][playerid]);
            
    TextDrawHideForPlayer(playeridAvtoTD[0]);
            
    TextDrawHideForPlayer(playeridAvtoTD[1]);
            
    TextDrawHideForPlayer(playeridAvtoTD[2]);
            
    TextDrawHideForPlayer(playeridAvtoTD[3]);
            
    TextDrawHideForPlayer(playeridAvtoTD[4]);
            
    TextDrawHideForPlayer(playeridAvtoTD[5]);
            
    TextDrawHideForPlayer(playeridAvtoTD[6]);
            
    CancelSelectTextDraw(playerid);
            
    TogglePlayerControllable(playeridtrue);
            
    SetPlayerPos(playeridas_p_pos[as][3], as_p_pos[as][4], as_p_pos[as][5]);
            
    SetPlayerFacingAngle(playeridas_p_pos[as][6]);
            
    SetPlayerInterior(playerid0);
            
    SetCameraBehindPlayer(playerid);
            
    SetPlayerVirtualWorld(playerid0);
            
    scm(playeridwhite,"Ïîçäðàâëÿåì ñ ïîêóïêîé íîâîãî àâòîìîáèëÿ");
            
    scm(playeridwhite,"Âàø àâòîìîáèëü ñòîèò æä¸ò âàñ îêîëî àâòîñàëîíà");
            
    p_own_car[playerid] = AddStaticVehicleEx(p_info[playerid][p_car_model], as_v_pos[as][0], as_v_pos[as][1], as_v_pos[as][2], as_v_pos[as][3], p_info[playerid][p_car_color][0], p_info[playerid][p_car_color][1], 1800);
            
    SetVehicleParamsEx(p_own_car[playerid], 0,0,0,0,0,0,0);
            
    v_info[p_own_car[playerid]][v_fuel] = 70.0;
            return 
    1;
        }
        if(
    clickedid == sk_td[1]) {
            if(
    p_info[playerid][p_sex] == 1) {
                if(
    p_skin_buy[playerid] > 0p_skin_buy[playerid]--;
                else 
    p_skin_buy[playerid] = sizeof(sk_skins_men)-1;
                
    SetPlayerSkin(playeridsk_skins_men[p_skin_buy[playerid]]);
                
    format(stra,250,"~y~cost~n~~g~$~w~%d"150 75 p_skin_buy[playerid]);
                
    PlayerTextDrawSetString(playeridsk_info_text[playerid], stra);
            }
            else {
                if(
    p_skin_buy[playerid] > 0p_skin_buy[playerid]--;
                else 
    p_skin_buy[playerid] = sizeof(sk_skins_wom)-1;
                
    SetPlayerSkin(playeridsk_skins_wom[p_skin_buy[playerid]]);
                
    format(stra,250,"~y~cost~n~~g~$~w~%d"150 75 p_skin_buy[playerid]);
                
    PlayerTextDrawSetString(playeridsk_info_text[playerid], stra);
            }
        }
        if(
    clickedid == sk_td[2]) {
            if(
    p_info[playerid][p_sex] == 1) {
                if(
    p_skin_buy[playerid] < sizeof(sk_skins_men)-1p_skin_buy[playerid]++;
                else 
    p_skin_buy[playerid] = 0;
                
    SetPlayerSkin(playeridsk_skins_men[p_skin_buy[playerid]]);
                
    format(stra,250,"~y~cost~n~~g~$~w~%d"150 75 p_skin_buy[playerid]);
                
    PlayerTextDrawSetString(playeridsk_info_text[playerid], stra);
            }
            else {
                if(
    p_skin_buy[playerid] < sizeof(sk_skins_wom)-1p_skin_buy[playerid]++;
                else 
    p_skin_buy[playerid] = 0;
                
    SetPlayerSkin(playeridsk_skins_wom[p_skin_buy[playerid]]);
                
    format(stra,250,"~y~cost~n~~g~$~w~%d"150 75 p_skin_buy[playerid]);
                
    PlayerTextDrawSetString(playeridsk_info_text[playerid], stra);
            }
        }
        if(
    clickedid == sk_td[3]) {
            
    p_skin_buy[playerid] = 0;
            
    SetPlayerPos(playerid207.9075,-103.9271,1005.2578);
            
    SetPlayerFacingAngle(playerid177.0579);
            
    SetPlayerInterior(playerid15);
            
    SetCameraBehindPlayer(playerid);
            
    SetPlayerVirtualWorld(playeridGetPVarInt(playerid,"check_sk")+1);
              
    CancelSelectTextDraw(playerid);
            
    SetPlayerSkin(playeridp_info[playerid][p_skin]);
            if(
    GetPlayerSkin(playerid) != p_info[playerid][p_skin]) {
                
    Kick(playerid);
                
    printf("%s èñïîëüçîâàë sobeit (NOP SetPlayerSkin)"p_info[playerid][p_name]);
            }
            for(new 
    i!= 5i++) TextDrawHideForPlayer(playeridsk_td[i]);
            
    PlayerTextDrawHide(playeridsk_info_text[playerid]);
        }
        if(
    clickedid == sk_td[4]) {
            if(
    p_info[playerid][p_money] < 150 75 p_skin_buy[playerid]) return err("Íåäîñòàòî÷íî ñðåäñòâ");
            if(
    p_info[playerid][p_skin] == GetPlayerSkin(playerid)) return err("Ó âàñ óæå åñòü äàííàÿ îäåæäà!");
            new 
    cost 150 75 p_skin_buy[playerid];
            
    SetPlayerPos(playerid207.9075,-103.9271,1005.2578);
            
    SetPlayerFacingAngle(playerid177.0579);
            
    SetPlayerInterior(playerid15);
            
    SetCameraBehindPlayer(playerid);
            
    SetPlayerVirtualWorld(playeridGetPVarInt(playerid,"check_sk")+1);
              
    CancelSelectTextDraw(playerid);
            for(new 
    i!= 5i++) TextDrawHideForPlayer(playeridsk_td[i]);
            
    PlayerTextDrawHide(playeridsk_info_text[playerid]);
            
    set_money(playerid, -cost);
            
    p_info[playerid][p_skin] = GetPlayerSkin(playerid);
            
    save_p_int(playerid"skin"p_info[playerid][p_skin]);
            
    SetPlayerSkin(playeridp_info[playerid][p_skin]);
            new 
    GetPVarInt(playerid"check_sk");
            
    sk_info[b][sk_balance] += cost;
            
    format(query250"UPDATE `skshop` SET `balance` = '%d' WHERE `id` = '%d'"sk_info[b][sk_balance], b);
            
    mysql_query(connectqueryfalse);
            
    p_skin_buy[playerid] = 0xFFFF;
        }
        if(
    clickedid == SkinTD[2]) {
            if(
    skin_ch_step[playerid] != 0xFFFF && !player_logged[playerid])
            {
                
    p_info[playerid][p_skin] = GetPlayerSkin(playerid);
                
    TextDrawHideForPlayer(playeridSkinTD[2]);
                for(new 
    0!= 12i++) TextDrawHideForPlayer(playeridRegistration[i]);
                for(new 
    0!= 4i++) PlayerTextDrawHide(playeridRegistrationforPlayer[playerid][i]);
                
    TogglePlayerControllable(playeridtrue);
                
    reg_player(playerid);
                
    skin_ch_step[playerid] = 0xFFFF;
                
    CancelSelectTextDraw(playerid);
                return 
    1;
            }
            return 
    1;
        }
        if(
    clickedid == Registration[10]) {
            if(
    skin_ch_step[playerid] != 0xFFFF)
            {
                if(
    p_info[playerid][p_sex] == 1) if(p_info[playerid][p_scolor] == 1)
                {
                    if(
    skin_ch_step[playerid] > 0skin_ch_step[playerid]--;
                    else 
    skin_ch_step[playerid] = sizeof(r_skin_1)-1;
                    
    SetPlayerSkin(playeridr_skin_1[skin_ch_step[playerid]]);
                }
                if(
    p_info[playerid][p_sex] == 1) if(p_info[playerid][p_scolor] == 2)
                {
                    if(
    skin_ch_step[playerid] > 0skin_ch_step[playerid]--;
                    else 
    skin_ch_step[playerid] = sizeof(r_skin_2)-1;
                    
    SetPlayerSkin(playeridr_skin_2[skin_ch_step[playerid]]);
                }
                return 
    1;
            }
        }
        if(
    clickedid == Test)
        {
            
    scm(playerid,-1,"Òåñò");
            return 
    1;
        }
        if(
    clickedid == Registration[11]) {
            if(
    skin_ch_step[playerid] != 0xFFFF)
            {
                if(
    p_info[playerid][p_sex] == 1) if(p_info[playerid][p_scolor] == 1)
                {
                    if(
    skin_ch_step[playerid] < sizeof(r_skin_1)-1skin_ch_step[playerid]++;
                    else 
    skin_ch_step[playerid] = 0;
                    
    SetPlayerSkin(playeridr_skin_1[skin_ch_step[playerid]]);
                }
                if(
    p_info[playerid][p_sex] == 1) if(p_info[playerid][p_scolor] == 2)
                {
                    if(
    skin_ch_step[playerid] < sizeof(r_skin_2)-1skin_ch_step[playerid]++;
                    else 
    skin_ch_step[playerid] = 0;
                    
    SetPlayerSkin(playeridr_skin_2[skin_ch_step[playerid]]);
                }
                return 
    1;
                }
              }
        }
        return 
    1;


 

 

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

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

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

Ваши права

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