Trunk won't open
#1

What is wrong with this code? The trunk won't open.

pawn Код:
CMD:trunk(playerid)
{
    new engine,lights,alarm,doors,bonnet,boot,objective, Float:X, Float:Y, Float:Z, string[90];
    for(new vid = 0; vid < MAX_VEHICLES; vid++){
        if(vid != INVALID_VEHICLE_ID) {
            GetVehiclePos(vid, X, Y, Z);
            if(!IsPlayerInRangeOfPoint(playerid, 5, X, Y, Z)) return 1;
            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
            if(boot == VEHICLE_PARAMS_ON){
                SetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
                format(string, sizeof(string), "closes the trunk of %s.", GetVehicleName(vid));
                return PlayerActionMsg(playerid, string);
            }
            SetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_ON,objective);
            format(string, sizeof(string), "opens the trunk of %s.", GetVehicleName(vid));
            return PlayerActionMsg(playerid, string);
        }
    }
    return 1;  
}
Reply


Messages In This Thread
Trunk won't open - by Outcast - 08.01.2012, 05:03
Re: Trunk won't open - by -Rebel Son- - 08.01.2012, 05:41
Re: Trunk won't open - by fiki574 - 08.01.2012, 09:11
Re: Trunk won't open - by Outcast - 08.01.2012, 10:06

Forum Jump:


Users browsing this thread: 1 Guest(s)