GetVehicleColor
#1

Error=fatal error 100: cannot read from file: "GetVehicleColor"
i Have GetVehicleColor inc Why i get Error any one help +rep this i use it .inc
PHP код:

    
/*
            SA-MP "GetVehicleColor v2.1" Include
            Copyright © 2011 RyDeR`
    */
     
    #if defined _Included_GetVehicleColor
            #endinput
    #endif
     
    #define _Included_GetVehicleColor
     
    #define PROPERTY_OFFSET(%0) \
            
((((%0) * ((%0) << 1)) << 2) + 65536)
     
    
stock n_AddStaticVehicle(modelIDFloatspawn_XFloatspawn_YFloatspawn_ZFloatz_Anglecolor1color2)
    {
            if(
color1 || color2 0)
            {
                    
color1 random(127);
                    
color2 random(127);
            }
            
modelID AddStaticVehicle(modelIDspawn_Xspawn_Yspawn_Zz_Anglecolor1color2);
           
            new
                    
colorStr[24]
            ;      
            
format(colorStrsizeof(colorStr), "%d-%d"color1color2);
            
setproperty(_""PROPERTY_OFFSET(modelID), colorStr);
           
            return 
modelID;
    }
     
    
stock n_AddStaticVehicleEx(modelIDFloatspawn_XFloatspawn_YFloatspawn_ZFloatz_Anglecolor1color2respawn_Delay)
    {
            if(
color1 || color2 0)
            {
                    
color1 random(127);
                    
color2 random(127);
            }
            
modelID AddStaticVehicleEx(modelIDspawn_Xspawn_Yspawn_Zz_Anglecolor1color2respawn_Delay);
           
            new
                    
colorStr[24]
            ;      
            
format(colorStrsizeof(colorStr), "%d-%d"color1color2);
            
setproperty(_""PROPERTY_OFFSET(modelID), colorStr);
           
            return 
modelID;
    }
     
    
stock n_CreateVehicle(modelIDFloatspawn_XFloatspawn_YFloatspawn_ZFloatz_Anglecolor1color2respawn_Delay)
    {
            if(
color1 || color2 0)
            {
                    
color1 random(127);
                    
color2 random(127);
            }
            
modelID CreateVehicle(modelIDspawn_Xspawn_Yspawn_Zz_Anglecolor1color2respawn_Delay);
           
            new
                    
colorStr[24]
            ;      
            
format(colorStrsizeof(colorStr), "%d-%d"color1color2);
            
setproperty(_""PROPERTY_OFFSET(modelID), colorStr);
           
            return 
modelID;
    }
     
    
stock n_DestroyVehicle(vehicleID)
    {
            
deleteproperty(_""PROPERTY_OFFSET(vehicleID));
           
            return 
DestroyVehicle(vehicleID);
    }
     
    
stock n_ChangeVehicleColor(vehicleIDcolor1color2)
    {
            new
                    
colorStr[24]
            ;      
            
format(colorStrsizeof(colorStr), "%d-%d"color1color2);
            
setproperty(_""PROPERTY_OFFSET(vehicleID), colorStr);
           
            return 
ChangeVehicleColor(vehicleIDcolor1color2);
    }
     
    public 
OnVehicleRespray(playeridvehicleidcolor1color2)
    {
            new
                    
colorStr[24]
            ;      
            
format(colorStrsizeof(colorStr), "%d-%d"color1color2);
            
setproperty(_""PROPERTY_OFFSET(vehicleid), colorStr);
           
            if(
funcidx("n_OnVehicleRespray") != -1)
            {
                    return 
CallLocalFunction("n_OnVehicleRespray""iiii"playeridvehicleidcolor1color2);
            }
            return 
1;
    }
     
    
stock GetVehicleColor(vehicleID, &color1, &color2)
    {
            
vehicleID PROPERTY_OFFSET(vehicleID);
           
            if(
existproperty(_""vehicleID))
            {
                    new
                            
colorStr[24],
                            
strPos
                    
;
                    
getproperty(_""vehicleIDcolorStr);
                    
strunpack(colorStrcolorStr);
                   
                    if((
strPos strfind(colorStr"-")) != -1)
                    {
                            
color1 strval(colorStr);
                            
color2 strval(colorStr[strPos 1]);
                            return 
1;
                    }
            }
            return 
0;
    }
     
    
#define AddStaticVehicle n_AddStaticVehicle
    #define AddStaticVehicleEx n_AddStaticVehicleEx
    #define CreateVehicle n_CreateVehicle
    #define DestroyVehicle n_DestroyVehicle
    #define ChangeVehicleColor n_ChangeVehicleColor
     
    #if defined _ALS_OnVehicleRespray
            #undef OnVehicleRespray
    #else
            #define _ALS_OnVehicleRespray
    #endif
     
    #define OnVehicleRespray n_OnVehicleRespray
     
    
forward n_OnVehicleRespray(playeridvehicleidcolor1color2); 
any one help me
Reply
#2

Make sure that You are using correct pawn that consist getvehiclecolor.inc in includes.
Reply
#3

Thanks, But i done fix it alone
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)