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

Уроки по скриптингу

Moderator: SJplayer

Avatar
Topic author
Miranda F
Старшина
Старшина
Posts: 143
With us: 7 years 2 months

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

Post #1by Miranda » 30 Nov 2013, 22:14

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

Image


в #define

Code: Select all

#define COLOR_BORDER            0x00000AA  


Ко всем new:

Code: Select all

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


В public OnGameModeInit()

Code: Select all

    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)
Ищите типо таких строк

Code: Select all

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
        } 
    }  


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

Code: Select all

            TextDrawShowForPlayer(playerid,LBorder); 
            
TextDrawShowForPlayer(playerid,RBorder); 
            
TextDrawShowForPlayer(playerid,BBorder); 
            
TextDrawShowForPlayer(playerid,TBorder); 
            
TextDrawHideForPlayer(playerid,LBorder); 
            
TextDrawHideForPlayer(playerid,RBorder); 
            
TextDrawHideForPlayer(playerid,BBorder); 
            
TextDrawHideForPlayer(playerid,TBorder); 
Image

! ! !


  • Similar Topics
    Replies
    Views
    Last post

Return to “Уроки”

Who is online

Users browsing this forum: 1 guest