Trunk help
#1

The trunk won't open mabye you guys can help me out?

PHP код:
CMD:trunk(playeridparams[])
{
    new
        
id = -1;
    if ((
id Car_Nearest(playerid)) != -1)
    {
        if (
IsVehicleImpounded(CarData[id][carVehicle]))
             return 
SendErrorMessage(playerid"This vehicle is impounded and you can't use it.");
        if (
IsPlayerInAnyVehicle(playerid))
             return 
SendErrorMessage(playerid"You must exit the vehicle first.");
        if (!
IsDoorVehicle(CarData[id][carVehicle]))
             return 
SendErrorMessage(playerid"This vehicle doesn't have a trunk.");
        if (
CarData[id][carLocked])
             return 
SendErrorMessage(playerid"The vehicle's trunk is locked.");
        for (new 
1!= MAX_VEHICLES++) if (IsValidVehicle(i))
        {
            if (!
GetTrunkStatus(i))
            {
                
SetTrunkStatus(itrue);
                
ApplyAnimation(playerid"CARRY""liftup"3.000000);
                
Car_ShowTrunk(playeridid);
                
SendNearbyMessage(playerid30.0COLOR_PURPLE"** %s has opened the trunk of the vehicle."ReturnName(playerid0));
                
ShowPlayerFooter(playerid"You have ~g~opened~w~ the trunk!");
            }
            else
            {
                
SetTrunkStatus(ifalse);
                
ApplyAnimation(playerid"CARRY""putdwn"3.000000);
                
SendNearbyMessage(playerid30.0COLOR_PURPLE"** %s has closed the trunk of the vehicle."ReturnName(playerid0));
                
ShowPlayerFooter(playerid"You have ~g~closed~w~ the trunk!");
            }
             return 
1;
         }
    }
    
SendErrorMessage(playerid"You are not in range of any vehicle.");
    return 
1;

PHP код:
stock GetTrunkStatus(vehicleid)
{
    static
        
engine,
        
lights,
        
alarm,
        
doors,
        
bonnet,
        
boot,
        
objective;
    
GetVehicleParamsEx(vehicleidenginelightsalarmdoorsbonnetbootobjective);
    if (
boot != 1)
        return 
0;
    return 
1;

PHP код:
stock SetTrunkStatus(vehicleidstatus)
{
    static
        
engine,
        
lights,
        
alarm,
        
doors,
        
bonnet,
        
boot,
        
objective;
    
GetVehicleParamsEx(vehicleidenginelightsalarmdoorsbonnetbootobjective);
    return 
SetVehicleParamsEx(vehicleidenginelightsalarmdoorsbonnetstatusobjective);

Reply
#2

pawn Код:
SetTrunkStatus(i, 1); //Is not defined boolean.
Try please.
Reply
#3

Quote:
Originally Posted by introzen
Посмотреть сообщение
pawn Код:
SetTrunkStatus(i, 1); //Is not defined boolean.
Try please.
Still same.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)