Всего тем: 1434
Сообщений: 7448
Новые сообщения Участники Правила форума Поиск RSS
Страница 1 из 11
Форум » Pawno » FilterScripts » [FS] Багажник , капот и фары
[FS] Багажник , капот и фары
sistemsДата: Суббота, 23.06.2012, 14:18 | Сообщение # 1
Сообщений: 135
Репутация: 8
Награды: 2
Клан:
n/a
Fun Team:
Bomj Gang
Группа: Пользователь
Статус:
Вот нашел у себя фары капот и багажник ^_^
В public OnPlayerCommandText

Code
  if (strcmp("/lh", cmdtext, true) == 0)  
     {  
         new carid = GetPlayerVehicleID(playerid);  
         if(lgh[carid] == 0)  
         {  
              if(GetPlayerVehicleID(playerid) != INVALID_VEHICLE_ID)  
              {  
                  if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)  
                 {  
                     new v = GetPlayerVehicleID(playerid);  
                     new Float:hp;  
                     GetVehicleHealth(v, hp);  
                        if(hp >=350)  
                        {  
                            GetPlayerName(playerid,sendername,sizeof(sendername));  
                          GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);  
                          SetVehicleParamsEx(GetPlayerVehicleID(playerid) ,engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);  
                          lgh[carid] = 1;  
                     }  
                     else  
                     {  
                         SendClientMessage(playerid, COLOR_GRAD1, "Фары повреждены!");  
                      }  
                  }  
                }  
           }  
         else if(lgh[carid] == 1)  
         {  
                if(GetPlayerVehicleID(playerid) != INVALID_VEHICLE_ID)  
                {  
                  if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)  
                  {  
                      GetPlayerName(playerid,sendername,sizeof(sendername));  
                      GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);  
                     SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);  
                      lgh[carid] = 0;  
                 }  
                }  
         }  
         return 1;  
     }  
     if (strcmp("/bonnet", cmdtext, true) == 0)  
     {  
         new carid = GetPlayerVehicleID(playerid);  
         if(bnt[carid] == 0)  
         {  
              if(GetPlayerVehicleID(playerid) != INVALID_VEHICLE_ID)  
              {  
                  if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)  
                 {  
                     new v = GetPlayerVehicleID(playerid);  
                     new Float:hp;  
                     GetVehicleHealth(v, hp);  
                        if(hp >=350)  
                        {  
                            GetPlayerName(playerid,sendername,sizeof(sendername));  
                          GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);  
                          SetVehicleParamsEx(GetPlayerVehicleID(playerid) ,engine,lights,alarm,doors,VEHICLE_PARAMS_ON,boot,objective);  
                          bnt[carid] = 1;  
                     }  
                     else  
                     {  
                         SendClientMessage(playerid, COLOR_GRAD1, "Капот поврежен!");  
                      }  
                  }  
                }  
           }  
         else if(bnt[carid] == 1)  
         {  
                if(GetPlayerVehicleID(playerid) != INVALID_VEHICLE_ID)  
                {  
                  if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)  
                  {  
                      GetPlayerName(playerid,sendername,sizeof(sendername));  
                      GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);  
                     SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);  
                      bnt[carid] = 0;  
                 }  
                }  
         }  
         return 1;  
     }  
     if (strcmp("/boot", cmdtext, true) == 0)  
     {  
         new carid = GetPlayerVehicleID(playerid);  
         if(bt[carid] == 0)  
         {  
              if(GetPlayerVehicleID(playerid) != INVALID_VEHICLE_ID)  
              {  
                  if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)  
                 {  
                     new v = GetPlayerVehicleID(playerid);  
                     new Float:hp;  
                     GetVehicleHealth(v, hp);  
                        if(hp >=350)  
                        {  
                            GetPlayerName(playerid,sendername,sizeof(sendername));  
                          GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);  
                          SetVehicleParamsEx(GetPlayerVehicleID(playerid) ,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_ON,objective);  
                          bt[carid] = 1;  
                     }  
                     else  
                     {  
                         SendClientMessage(playerid, COLOR_GRAD1, "Багажник поврежден");  
                      }  
                  }  
                }  
           }  
         else if(bt[carid] == 1)  
         {  
                if(GetPlayerVehicleID(playerid) != INVALID_VEHICLE_ID)  
                {  
                  if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)  
                  {  
                      GetPlayerName(playerid,sendername,sizeof(sendername));  
                      GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);  
                     SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);  
                      bt[carid] = 0;  
                 }  
                }  
         }  
         return 1;
     }


Лучший бесплатный WebHosting
 
Форум » Pawno » FilterScripts » [FS] Багажник , капот и фары
Страница 1 из 11
Поиск:
Всего пользователей: 7647
За сегодня: 0
За вчера: 0
За неделю: 1
За этот месяц: 3

Копирование материалов без указания на наш сайт запрещено!
Дизайн полностью принадлежит сайту MP-Info.ru
Автор дизайна: Silverback
© MP-Info.ru 2011-2017