Обводка спидометра Samp-RP

Описание: Уроки по скриптингу
Модератор: SJplayer

Miranda F
Автор темы, Старшина
Старшина
Аватара
Miranda F
Автор темы, Старшина
Старшина
Сообщения: 143
Зарегистрирован: 5 июля 2013
С нами: 10 лет 8 месяцев

#1 Miranda » 30 ноября 2013, 22:14

Обводка спидометра Samp-RP

Изображение


в #define

Код: Выделить всё

#define COLOR_BORDER            0x00000AA  


Ко всем new:

Код: Выделить всё

new Text:LBorder
new 
Text:RBorder
new 
Text:BBorder
new 
Text:TBorder


В public OnGameModeInit()

Код: Выделить всё

    LBorder TextDrawCreate(352.000000389.000000" "); 
    
RBorder TextDrawCreate(351.000000434.000000" "); 
    
BBorder TextDrawCreate(353.000000389.000000"      "); 
    
TBorder TextDrawCreate(532.000000389.000000"      "); 
     
    
TextDrawBackgroundColor(LBorderCOLOR_BORDER); 
    
TextDrawFont(LBorder1); 
    
TextDrawLetterSize(LBorder0.5000001.000000); 
    
TextDrawColor(LBorder, -1); 
    
TextDrawSetOutline(LBorder0); 
    
TextDrawSetProportional(LBorder1); 
    
TextDrawSetShadow(LBorder1); 
    
TextDrawUseBox(LBorder1); 
    
TextDrawBoxColor(LBorderCOLOR_BORDER); 
    
TextDrawTextSize(LBorder528.0000000.000000); 

       
TextDrawBackgroundColor(RBorderCOLOR_BORDER); 
    
TextDrawFont(RBorder1); 
    
TextDrawLetterSize(RBorder0.5000001.000000); 
    
TextDrawColor(RBorder, -1); 
    
TextDrawSetOutline(RBorder0); 
    
TextDrawSetProportional(RBorder1); 
    
TextDrawSetShadow(RBorder1); 
    
TextDrawUseBox(RBorder1); 
    
TextDrawBoxColor(RBorderCOLOR_BORDER); 
    
TextDrawTextSize(RBorder530.0000000.000000); 

    
TextDrawBackgroundColor(BBorderCOLOR_BORDER); 
    
TextDrawFont(BBorder1); 
    
TextDrawLetterSize(BBorder0.5000001.000000); 
    
TextDrawColor(BBorder, -1); 
    
TextDrawSetOutline(BBorder0); 
    
TextDrawSetProportional(BBorder1); 
    
TextDrawSetShadow(BBorder1); 
    
TextDrawUseBox(BBorder1); 
    
TextDrawBoxColor(BBorderCOLOR_BORDER); 
    
TextDrawTextSize(BBorder343.000000, -2.000000); 

    
TextDrawBackgroundColor(TBorderCOLOR_BORDER); 
    
TextDrawFont(TBorder1); 
    
TextDrawLetterSize(TBorder0.5000001.000000); 
    
TextDrawColor(TBorder, -1); 
    
TextDrawSetOutline(TBorder0); 
    
TextDrawSetProportional(TBorder1); 
    
TextDrawSetShadow(TBorder1); 
    
TextDrawUseBox(TBorder1); 
    
TextDrawBoxColor(TBorderCOLOR_BORDER); 
    
TextDrawTextSize(TBorder532.0000000.000000);  


В public OnPlayerStateChange(playerid, newstate, oldstate)
Ищите типо таких строк

Код: Выделить всё

f(newstate == PLAYER_STATE_DRIVER
    { 
        if(
PlayerRacing[playerid] == 0
         { 
             if(!
IsAPlane(tacha) && !IsABoat(tacha) && !IsANoSpeed(tacha)) 
            { 
                
TextDrawShowForPlayer(playerid,Box); 
                
TextDrawShowForPlayer(playerid,LBorder); 
                 
TextDrawShowForPlayer(playerid,RBorder); 
                 
TextDrawShowForPlayer(playerid,BBorder); 
                 
TextDrawShowForPlayer(playerid,TBorder); 
                
TextDrawShowForPlayer(playerid,SpeedShow[playerid]); 
                
TextDrawShowForPlayer(playerid,Fuel); 
                
TextDrawShowForPlayer(playerid,FuelShow[playerid]); 
                
TextDrawShowForPlayer(playerid,Status); 
                
TextDrawShowForPlayer(playerid,StatusShow[playerid]); 
                
TextDrawShowForPlayer(playerid,KMShow[playerid]); 
                
TextDrawShowForPlayer(playerid,FillShow[playerid]); 
                
TextDrawShowForPlayer(playerid,MaxShow[playerid]); 
                
Arrester[playerid] = true
            } 
        } 
    } 
    else if(
newstate == PLAYER_STATE_ONFOOT
    { 
         if(!
IsAPlane(tacha) && !IsABoat(tacha) && !IsANoSpeed(tacha)) 
        { 
            
TextDrawHideForPlayer(playerid,Box); 
            
TextDrawHideForPlayer(playerid,LBorder); 
            
TextDrawHideForPlayer(playerid,RBorder); 
            
TextDrawHideForPlayer(playerid,BBorder); 
            
TextDrawHideForPlayer(playerid,TBorder); 
            
TextDrawHideForPlayer(playerid,SpeedShow[playerid]); 
            
TextDrawHideForPlayer(playerid,Fuel); 
            
TextDrawHideForPlayer(playerid,FuelShow[playerid]); 
            
TextDrawHideForPlayer(playerid,Status); 
            
TextDrawHideForPlayer(playerid,StatusShow[playerid]); 
            
TextDrawHideForPlayer(playerid,KMShow[playerid]); 
            
TextDrawHideForPlayer(playerid,FillShow[playerid]); 
            
TextDrawHideForPlayer(playerid,MaxShow[playerid]); 
            
Arrester[playerid] = false
        } 
    }  


И к ним добовляйте:

Код: Выделить всё

            TextDrawShowForPlayer(playerid,LBorder); 
            
TextDrawShowForPlayer(playerid,RBorder); 
            
TextDrawShowForPlayer(playerid,BBorder); 
            
TextDrawShowForPlayer(playerid,TBorder); 
            
TextDrawHideForPlayer(playerid,LBorder); 
            
TextDrawHideForPlayer(playerid,RBorder); 
            
TextDrawHideForPlayer(playerid,BBorder); 
            
TextDrawHideForPlayer(playerid,TBorder); 
Изображение


  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «Уроки»

Кто сейчас на форуме (по активности за 5 минут)

Сейчас этот раздел просматривают: 3 гостя